mirror of https://github.com/status-im/metro.git
support es6.constants by default. Fixes #2932
Summary: In javascriptcore(ios9), this code will run as expected(output 0 1): ```js for(let i=0; i<2; i++) { const data = i; console.log(data); } ``` But when debug in chrome, the above code will fail without `use strict` prologue (if you add prologue, rn will fail with red screen `Const declarations are not supported in strict mode`): https://code.google.com/p/v8/issues/detail?id=4432. So it's better to transpile contant by default. Closes https://github.com/facebook/react-native/pull/2955 Reviewed By: @svcscm Differential Revision: D2483398 Pulled By: @vjeux
This commit is contained in:
parent
2a1d958251
commit
d4f9750e38
|
@ -6,9 +6,8 @@
|
||||||
"whitelist": [
|
"whitelist": [
|
||||||
"es6.arrowFunctions",
|
"es6.arrowFunctions",
|
||||||
"es6.blockScoping",
|
"es6.blockScoping",
|
||||||
// This is the only place where we differ from transformer.js
|
|
||||||
"es6.constants",
|
|
||||||
"es6.classes",
|
"es6.classes",
|
||||||
|
"es6.constants",
|
||||||
"es6.destructuring",
|
"es6.destructuring",
|
||||||
"es6.parameters",
|
"es6.parameters",
|
||||||
"es6.properties.computed",
|
"es6.properties.computed",
|
||||||
|
|
|
@ -35,6 +35,7 @@ function transform(src, filename, options) {
|
||||||
'es6.arrowFunctions',
|
'es6.arrowFunctions',
|
||||||
'es6.blockScoping',
|
'es6.blockScoping',
|
||||||
'es6.classes',
|
'es6.classes',
|
||||||
|
'es6.constants',
|
||||||
'es6.destructuring',
|
'es6.destructuring',
|
||||||
'es6.parameters',
|
'es6.parameters',
|
||||||
'es6.properties.computed',
|
'es6.properties.computed',
|
||||||
|
|
Loading…
Reference in New Issue