-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure global objects initialization for web #3418
Conversation
The PR with tree shaking moved global objects initialization for web to another file and then imported it into the `index` file (`import './reanimated2/js-reanimated/global';`). However, the Webpack can lazy import modules, but we don't have any call to this module, so global objects were never initialized. Fixes #3355
in another way, the bundler can remove unused variables. | ||
*/ | ||
console.error('[Reanimated] Unable to initialize global objects for web.'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change supposed to be applied to the src/index.web.ts
file instead?
## Description The PR with tree shaking moved global objects initialization for web to another file and then imported it into the `index` file (`import './reanimated2/js-reanimated/global';`). However, the Webpack can lazy import modules, but we don't have any call to this module, so global objects were never initialized. Fixes software-mansion#3355
@piaskowyk it does not solve anything since you did not applied the fix to |
The |
I'm with react-native-reanimated@2.14.4 (last version for Expo SDK 48) and there is the PR's code in |
Hello I'm also working with react-native-reanimated@2.14.4 (Expo SDK 48) and the error with |
Did you try Reanimated3? |
Description
The PR with tree shaking moved global objects initialization for web to another file and then imported it into the
index
file (import './reanimated2/js-reanimated/global';
). However, the Webpack can lazy import modules, but we don't have any call to this module, so global objects were never initialized.Fixes #3355