-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
babel strict mode transform is not working with v0.26 #7700
Comments
@formatlos Cannot reproduce. What errors are you seeing? Did you try running the packager with |
seems that it doesn't work with |
Also having the same problem over here. Errors include "Properties can only be defined on Objects." (same as @formatlos posted) and "Unhandled JS Exception: Module RCTLog is not a registered callable module." |
I am also having the same issues. When I
Or this one:
I am using react-native v0.27.1 My .babelrc:
|
This happens because I'll submit a PR to use |
Summary: `polyfillLazyGlobal` used a top level this which get stripped by babel `transform-es2015-modules-commonjs` with the default config. This is mainly an issues for people not using the react native babel preset. This also replaces a few GLOBAL with global for consistency with the rest of the file. **Test plan** Tested that there was an error when using `['transform-es2015-modules-commonjs', { strict: true, allowTopLevelThis: false }]` in the babel config and that it was fixed after applying my changes. Fixes facebook#7700 Closes facebook#7971 Differential Revision: D3427675 Pulled By: javache fbshipit-source-id: 48f258b0db1bf21185193bd56df453ced9242e64
These instructions didn't work for me (react-native 0.27.2 in case it matters), but I've found that the problem goes away if I merely dismiss the error by pressing |
Summary: `polyfillLazyGlobal` used a top level this which get stripped by babel `transform-es2015-modules-commonjs` with the default config. This is mainly an issues for people not using the react native babel preset. This also replaces a few GLOBAL with global for consistency with the rest of the file. **Test plan** Tested that there was an error when using `['transform-es2015-modules-commonjs', { strict: true, allowTopLevelThis: false }]` in the babel config and that it was fixed after applying my changes. Fixes facebook#7700 Closes facebook#7971 Differential Revision: D3427675 Pulled By: javache fbshipit-source-id: 48f258b0db1bf21185193bd56df453ced9242e64
Summary: `polyfillLazyGlobal` used a top level this which get stripped by babel `transform-es2015-modules-commonjs` with the default config. This is mainly an issues for people not using the react native babel preset. This also replaces a few GLOBAL with global for consistency with the rest of the file. **Test plan** Tested that there was an error when using `['transform-es2015-modules-commonjs', { strict: true, allowTopLevelThis: false }]` in the babel config and that it was fixed after applying my changes. Fixes facebook#7700 Closes facebook#7971 Differential Revision: D3427675 Pulled By: javache fbshipit-source-id: 48f258b0db1bf21185193bd56df453ced9242e64
since v0.26 babel strict mode transform is not working anymore. I get different errors mostly of internal methods which try to use setters on read-only objects.
The text was updated successfully, but these errors were encountered: