How to specify "no minify" option to Webstorm build with Webpack

Hello,

When we run "npm build" in webstorm, I guess it uses webpack to bundle a typescript project such as a react-typescript project. How does one tell webpack to not minify the JS files in the bundle ?

I do not want to change the webpack.config.js file under node_modules/react-scripts. So, I am looking for a way to specify the same in my project directory.

0
1 comment

This is not the IDE that builds your application, all Webstorm does is starting npm run build command. The application is bundled with react-scripts. Unfortunately the only way to modify the default webpack configuration used by it is using eject. Another way to create a custom configuration is using the CRA fork, see https://create-react-app.dev/docs/alternatives-to-ejecting. For example, you can try the https://www.npmjs.com/package/@jdcrensh/react-scripts fork with react-scripts-plugin-no-minify plugin

2

Please sign in to leave a comment.