0
votes

React- Webpack minifying code and creating bundle in dev env. I want all unbundled files in dev so that i can debug ?

Attached below is webpack.config.js devServer: { contentBase: BUILD_DIR, // port: 9001, compress: true, hot: true, open: true },

Please let me know which configurations should i be changing?

1

1 Answers

0
votes

The primary purpose of WebPack is to bundle JavaScript files.

If you want to debug the js code, try to generate sourcemap files using devtool option.

If you are using webpack version 4 and above, then try to set the mode option to "development".

The sourcemap files will be helpful while debugging in browser.

Similar discussion on another SO thread