Skip to content

Commit bc54a45

Browse files
janicduplessisFacebook Github Bot 0
authored and
Facebook Github Bot 0
committed
Revert strict mode in transform-es2015-modules-commonjs
Summary:See discussion here facebook#5796 (comment) **Test plan (required)** Change the babel-preset-react-native dependency to `"babel-preset-react-native": "file:./babel-preset",` so it uses the local babel-preset instead of the one from npm. ``` ./packager/packager.sh --reset-cache ``` open `http://localhost:8081/Examples/UIExplorer/UIExplorerApp.android.bundle?platform=android&dev=true&hot=false&minify=false` and there should not be any added 'strict mode'. Closes facebook#6686 Reviewed By: mkonicek Differential Revision: D3103122 Pulled By: bestander fb-gh-sync-id: 85658ee01bb73f13dacb2b6a48ab121324c13118 fbshipit-source-id: 85658ee01bb73f13dacb2b6a48ab121324c13118
1 parent 51b5423 commit bc54a45

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

babel-preset/configs/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'transform-es2015-computed-properties',
2525
'transform-es2015-constants',
2626
'transform-es2015-destructuring',
27-
['transform-es2015-modules-commonjs', { allowTopLevelThis: true }],
27+
['transform-es2015-modules-commonjs', { strict: false, allowTopLevelThis: true }],
2828
'transform-es2015-parameters',
2929
'transform-es2015-shorthand-properties',
3030
'transform-es2015-spread',

babel-preset/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-preset-react-native",
3-
"version": "1.5.3",
3+
"version": "1.5.4",
44
"description": "Babel preset for React Native applications",
55
"main": "index.js",
66
"repository": "https://github.com/facebook/react-native/tree/master/babel-preset",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"babel-core": "^6.6.4",
134134
"babel-plugin-external-helpers": "^6.5.0",
135135
"babel-polyfill": "^6.6.1",
136-
"babel-preset-react-native": "^1.5.2",
136+
"babel-preset-react-native": "1.5.2",
137137
"babel-register": "^6.6.0",
138138
"babel-types": "^6.6.4",
139139
"babylon": "^6.6.4",

0 commit comments

Comments
 (0)