Skip to content

Commit

Permalink
Prevent dynamic import transforms to fix lazy loading
Browse files Browse the repository at this point in the history
Fixes cookpete/react-player#886
@babel/preset-env@7.5 added `@babel/plugin-proposal-dynamic-import`, which transformed the `import()` statements
More info: babel/babel#10273 (comment)
  • Loading branch information
webmiraclepro committed May 19, 2020
1 parent 56dac69 commit aa93153
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,14 @@
},
"babel": {
"presets": [
"@babel/preset-env",
[
"@babel/preset-env",
{
"exclude": [
"@babel/plugin-proposal-dynamic-import"
]
}
],
"@babel/preset-react"
],
"plugins": [
Expand Down

0 comments on commit aa93153

Please sign in to comment.