-
Notifications
You must be signed in to change notification settings - Fork 12
error when minifying code #3
Comments
We are using from this repo in a React/Webpack environment without issues, along with Uglify. Could you post the full failure log? (Line 19 is a |
sure will do and come back, using parity/parity.js and using transport instead of provider it does not give any error |
Will also create a scaled-down version using react-create-app - should help in debugging the issue. |
Ok, can reproduce -
|
yes that is the error prompted when using using yarn build in react-create-app! |
Ok, this is due to react-create-app not operating on node_modules and has no real way of overriding this. Although the target browsers, those supporting fetch (& node) supports arrow functions and facebook/create-react-app#1125 As per the above, we are not the only ones with this slight issue. Leaving it open to try and find a solution that does not involve re-wiring everything pre arrow-functions and deconstruction and also does not require bringing back the pre-compilation step. |
|
FYI, we're starting the work to compile deps with Let us know if you have feedback about how this should work. |
react gives me this error:
Failed to minify the code from this file:
Read more here: http://bit.ly/2tRViJ9
From the link:
npm run build fails to minify
You may occasionally find a package you depend on needs compiled or ships code for a non-browser environment.
This is considered poor practice in the ecosystem and does not have an escape hatch in Create React App.
To resolve this:
Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled (retaining ES6 Modules).
Fork the package and publish a corrected version yourself.
If the dependency is small enough, copy it to your src/ folder and treat it as application code.
The text was updated successfully, but these errors were encountered: