-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ERROR in reactPlayerDailyMotion.js from Terser #912
Comments
Try setting |
I've configured the terser-webpack-plugin like this: optimization: {
minimizer: [
new TerserPlugin({
include: /\/node_modules\/react-player/,
terserOptions: {
ecma: 8
}
})
]
}, This worked. Thank you for the tip @cookpete! |
Realized my bundle size exploded and that the include I configured actually disables terser for everything. Removing it enables minification but setting the terser ecma option still fails with react-player. |
Updating the library to use |
@IgnusG Does turning off code splitting fix things? Something like: plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
] in your webpack config. I understand it's not desirable but would be good to know if it helps. |
Interesting. That does solve the issue. The output is properly minified and react-player is included correctly in the bundle. |
So it's something to do with Terser trying to parse the individual chunks from the dynamically imported players. I'm trying to figure out what to do about this. I may have to bring back single player imports like |
For me the dynamic imports "worked" in version 2.0.1 but broke after updating to 2.1.0. Oh - #886 (comment) |
Yeah, I'm going to release |
You should not have this issue in |
Fixes cookpete/react-player#912 Fixes cookpete/react-player#907 Fixes cookpete/react-player#865 Sort of fixes cookpete/react-player#910 Sort of fixes cookpete/react-player#902 Affects cookpete/react-player#886 Affects cookpete/react-player#738
Fixes cookpete/react-player#912 Fixes cookpete/react-player#907 Fixes cookpete/react-player#865 Sort of fixes cookpete/react-player#910 Sort of fixes cookpete/react-player#902 Affects cookpete/react-player#886 Affects cookpete/react-player#738
Current Behavior
Building with webpack results in error messages:
Expected Behavior
Compile
Steps to Reproduce
Environment
No bundle output so no browser or url passed in for testing
webpack: 4.42.1
react-player: 2.1.1
The text was updated successfully, but these errors were encountered: