All my compliments for this amazing tool.
I used this library in my project, and i want using in production but during the build process i got this error, hope you can help.
Failed to compile.
Failed to minify the code from this file:
./node_modules/postprocessing/src/effects/Effect.js:13
Thank you in advance
just updated the posprocessing to latest version, and now i get:
Failed to minify the code from this file:
./node_modules/postprocessing/build/postprocessing.esm.js:16
Hi,
this looks like a build configuration problem on your end.
Those error messages are not very helpful. Which minification tool are you currently using and at which point during your build process does it run?
If you're using Webpack for bundling and Babel for transpilation, make sure that the postprocessing library in your node_modules directory is __not__ excluded from the transpilation process. Alternatively, you can configure Webpack to use the main entry point instead.
Possibly related: #115
i fixed the issue,
Alternatively, you can configure Webpack to use the main entry point instead.
unfortunately having react-create-app i cannot have access to my webpack config unless i eject my app.
For who has the same problem i think the reason of the failed minified is in this link.
where it say:
npm run build fails to minify
Before [email protected], this problem was caused by third party node_modules using modern JavaScript features because the minifier couldn't handle them during the build. This has been solved by compiling standard modern JavaScript features inside node_modules in [email protected] and higher. If you're seeing this error, you're likely using an old version of react-scripts. You can either fix it by avoiding a dependency that uses modern syntax, or by upgrading to react-scripts@>=2.0.0 and following the migration instructions in the changelog.
i upgraded the react-scripts to version 2.0.0, i suggest trying this way, instead that upgrade manually( i spent few hours to update manually a bunch of packages obsolete for the new scripts)
After upgraded i did the build and all worked fine. Thanks @vanruesc for the help, i think everyone with access to the webpack config can follow your advice.