Browse Source

update @babel/plugin-syntax-dynamic-import link (#3046)

Docs previously linked to https://classic.yarnpkg.com/en/package/babel-plugin-syntax-dynamic-import for Babel 6. Updated link to point to plugin compatible with Babel 7.
main
Stephanie Coates 4 years ago
committed by GitHub
parent
commit
1f7a4b9574
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/code-splitting.md

2
content/docs/code-splitting.md

@ -103,7 +103,7 @@ If you're setting up Webpack yourself, you'll probably want to read Webpack's
[guide on code splitting](https://webpack.js.org/guides/code-splitting/). Your Webpack config should look vaguely [like this](https://gist.github.com/gaearon/ca6e803f5c604d37468b0091d9959269).
When using [Babel](https://babeljs.io/), you'll need to make sure that Babel can
parse the dynamic import syntax but is not transforming it. For that you will need [babel-plugin-syntax-dynamic-import](https://yarnpkg.com/en/package/babel-plugin-syntax-dynamic-import).
parse the dynamic import syntax but is not transforming it. For that you will need [@babel/plugin-syntax-dynamic-import](https://classic.yarnpkg.com/en/package/@babel/plugin-syntax-dynamic-import).
## `React.lazy` {#reactlazy}

Loading…
Cancel
Save