Closed dangelion closed 4 years ago
Hi @dangelion
You must add the condition against production env var like this:
if (process.env.NODE_ENV === 'production') {
config.plugins.push(
...
You can check the classic theme webpack config file: https://github.com/PrestaShop/PrestaShop/blob/develop/themes/classic/_dev/webpack.config.js#L89
While developing with
npm run watch
I noticed it compiles for production (minify JS, removes console.log, etc) while it shouldn't. Alsonpm run build
shouldn't compiles for production. You should add another commandnpm run prod
to do that. Any help to achieve that?