create-react-app can't minify parser.js
See original GitHub issueHi there,
Having a problem with the library building from create-react-app from v3.0.0 onwards. 2.12.1 is fine. On running npm run build, I get:
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/rss-parser/lib/parser.js:16
Read more here: http://bit.ly/2tRViJ9
Looks like an ES5/ES6 issue?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:22 (5 by maintainers)
Top Results From Across the Web
Unable to minify react application to production - Stack Overflow
I'm having issued generate a production build of the react application and have this error. Failed to minify the code from this file:...
Read more >What Does Create-React-App Actually Do? | by Andrew Mc
First is the scripts. These will probably be familiar as start, build, test, and eject. These scripts are actually located in the same...
Read more >Terser vs. Uglify vs. babel-minify: Comparing JavaScript ...
See how Terser compares to UglifyJS and babel-minify. ... Terser is a JavaScript parser and mangler/compressor toolkit for ES6+.
Read more >react-scripts-plugin-no-minify | Yarn - Package Manager
Disable build minification in your CRA app's build output. Install. yarn add -D react-scripts-plugin-no-minify. Add to cra.config.js
Read more >How To Set Up a React Project with Create React App
But now, Create React App includes all the JavaScript packages you ... run a build to create a fully minified version of your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@nikomc0 encounter the same issue while using create-react-app.
What I did to solve around is to import the pre-compiled version directly and use the
RSSParser
instead ofParse
and I also have to declare eslint global namespace to avoid the create-react-app build errors.also, I tried to add module property to the package.json which pass the build but since two version has different parser naming, it wasn’t working properly.
Can someone explain further how to implement @n7best 's workaround? I’ve tried the below with no success.