Webpacker: Disable optimization / uglify

Created on 11 Jun 2018  路  3Comments  路  Source: rails/webpacker

I want to disable optimization / uglify to be able to debug a problem. Anything using the webpack configuration didn't work. Any advice?

Most helpful comment

To disable uglify (which is the default minimizer), you can do the following (this would be for a single environment's config file):

const environment = require('./environment')
const config = environment.toWebpackConfig();
delete(config.optimization.minimizer)

module.exports = config

in addition to any other modifications you make to environment or want to merge in.

All 3 comments

To disable uglify (which is the default minimizer), you can do the following (this would be for a single environment's config file):

const environment = require('./environment')
const config = environment.toWebpackConfig();
delete(config.optimization.minimizer)

module.exports = config

in addition to any other modifications you make to environment or want to merge in.

That's what I was looking for. Thanks.

I needed config.optimization.minimize = false too

Was this page helpful?
0 / 5 - 0 ratings