Describe the bug
Production version of bundles contains inlined source maps which makes the bundles huge.
To Reproduce
Steps to reproduce the behavior:
Do ENV=production npm run start:dist
Open the Network analysis tool in your favourite browser
observe the bundle size (on my project that only really has jQuery and a carousel plugin, it is around 2MB with the sourcemap, without the sourcemap it is around 300k)
(see 'devtools' setting in webpack.config.js file which always sets the value to 'cheap-eval-source-map')
Expected behavior
Source Maps should not be inlined on production because it creates huge JS files.
According to https://webpack.js.org/configuration/devtool/ for production this value should be one of the production values (do not specific devtool, 'source-map', 'hidden-source-map', and 'nosources-source-map') depending on what exactly you need.
recommendation
Reading the webpack docs, I'm inclined to say that 'hidden-source-map' is a good default option here. so omit a webpack.config.js file that has something like this line:
Describe the bug Production version of bundles contains inlined source maps which makes the bundles huge.
To Reproduce Steps to reproduce the behavior:
(see 'devtools' setting in webpack.config.js file which always sets the value to 'cheap-eval-source-map')
Expected behavior Source Maps should not be inlined on production because it creates huge JS files.
According to https://webpack.js.org/configuration/devtool/ for production this value should be one of the production values (do not specific devtool, 'source-map', 'hidden-source-map', and 'nosources-source-map') depending on what exactly you need.
recommendation
Reading the webpack docs, I'm inclined to say that 'hidden-source-map' is a good default option here. so omit a webpack.config.js file that has something like this line: