RN babel preset: add import() syntax
Summary: Allows us to parse the `import()` syntax. For now it's not transformed, so it would crash at runtime (or at minification with UglifyJS). However I want to release this under a new major version, so this wouldn't be allowed in OSS right away. Also we bump to version 3.0.0 before release. D5443966 possibly introduced breaking changes, so it needs a major bump. Reviewed By: cpojer Differential Revision: D5630084 fbshipit-source-id: b271bbb8577ba7184e975f996ec415a915e869d9
This commit is contained in:
parent
7abce0b742
commit
ab9c788c2c
|
@ -21,6 +21,7 @@ const getPreset = (src, options) => {
|
||||||
|
|
||||||
plugins.push(
|
plugins.push(
|
||||||
'syntax-class-properties',
|
'syntax-class-properties',
|
||||||
|
'syntax-dynamic-import',
|
||||||
'syntax-trailing-function-commas',
|
'syntax-trailing-function-commas',
|
||||||
'transform-class-properties',
|
'transform-class-properties',
|
||||||
'transform-es2015-block-scoping',
|
'transform-es2015-block-scoping',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "babel-preset-react-native",
|
"name": "babel-preset-react-native",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"description": "Babel preset for React Native applications",
|
"description": "Babel preset for React Native applications",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "https://github.com/facebook/react-native/tree/master/babel-preset",
|
"repository": "https://github.com/facebook/react-native/tree/master/babel-preset",
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
"babel-plugin-react-transform": "2.0.2",
|
"babel-plugin-react-transform": "2.0.2",
|
||||||
"babel-plugin-syntax-async-functions": "^6.5.0",
|
"babel-plugin-syntax-async-functions": "^6.5.0",
|
||||||
"babel-plugin-syntax-class-properties": "^6.5.0",
|
"babel-plugin-syntax-class-properties": "^6.5.0",
|
||||||
|
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||||
"babel-plugin-syntax-flow": "^6.5.0",
|
"babel-plugin-syntax-flow": "^6.5.0",
|
||||||
"babel-plugin-syntax-jsx": "^6.5.0",
|
"babel-plugin-syntax-jsx": "^6.5.0",
|
||||||
"babel-plugin-syntax-trailing-function-commas": "^6.5.0",
|
"babel-plugin-syntax-trailing-function-commas": "^6.5.0",
|
||||||
|
|
|
@ -12,6 +12,7 @@ module.exports = {
|
||||||
'babel-plugin-react-transform': require('babel-plugin-react-transform'),
|
'babel-plugin-react-transform': require('babel-plugin-react-transform'),
|
||||||
'babel-plugin-syntax-async-functions': require('babel-plugin-syntax-async-functions'),
|
'babel-plugin-syntax-async-functions': require('babel-plugin-syntax-async-functions'),
|
||||||
'babel-plugin-syntax-class-properties': require('babel-plugin-syntax-class-properties'),
|
'babel-plugin-syntax-class-properties': require('babel-plugin-syntax-class-properties'),
|
||||||
|
'babel-plugin-syntax-dynamic-import': require('babel-plugin-syntax-dynamic-import'),
|
||||||
'babel-plugin-syntax-trailing-function-commas': require('babel-plugin-syntax-trailing-function-commas'),
|
'babel-plugin-syntax-trailing-function-commas': require('babel-plugin-syntax-trailing-function-commas'),
|
||||||
'babel-plugin-transform-class-properties': require('babel-plugin-transform-class-properties'),
|
'babel-plugin-transform-class-properties': require('babel-plugin-transform-class-properties'),
|
||||||
'babel-plugin-transform-es2015-function-name': require('babel-plugin-transform-es2015-function-name'),
|
'babel-plugin-transform-es2015-function-name': require('babel-plugin-transform-es2015-function-name'),
|
||||||
|
|
Loading…
Reference in New Issue