Skip to content
  • Sponsor facebook/create-react-app

  • Notifications You must be signed in to change notification settings
  • Fork 27k
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

Add support for dynamic import & disable require.ensure #1538

Merged
merged 7 commits into from
Feb 15, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add babel plugin for parsing import()
Timer committed Feb 12, 2017

Unverified

This user has not yet uploaded their public signing key.
commit 0055e79829e25506c121cabe6a0423cbc11b8664
4 changes: 3 additions & 1 deletion packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
@@ -30,7 +30,9 @@ const plugins = [
regenerator: true,
// Resolve the Babel runtime relative to the config.
moduleName: path.dirname(require.resolve('babel-runtime/package'))
}]
}],
// Enables parsing of import()
require.resolve('babel-plugin-syntax-dynamic-import')
];

// This is similar to how `env` works in Babel:
1 change: 1 addition & 0 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
"index.js"
],
"dependencies": {
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.22.0",
"babel-plugin-transform-es2015-parameters": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.22.0",