Skip to content

Commit 28c4a6a

Browse files
authored
add note about use with Babel [skip ci]
1 parent 5cd9b18 commit 28c4a6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/guides/migrating.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ require.ensure([], function(require) {
301301

302302
(Note on the deprecated `System.import`: Webpack's use of `System.import` didn't fit the proposed spec, so it was deprecated in [v2.1.0-beta.28](https://github.com/webpack/webpack/releases/tag/v2.1.0-beta.28) in favor of `import()`)
303303

304+
If you want to use `import` with [Babel](http://babeljs.io/), you'll need to install/add the [dynamic-import](http://babeljs.io/docs/plugins/syntax-dynamic-import/) syntax plugin while it's still Stage-3. When the proposal is added to the spec this won't be necessary anymore.
305+
304306
### Dynamic expressions
305307

306308
It's possible to pass a partial expression to `import()`. This is handled similar to expressions in CommonJS (webpack creates a [context](https://webpack.github.io/docs/context.html) with all possible files).

0 commit comments

Comments
 (0)