Turn off uglify in WebPack 2

Is there a way to skip the uglify js plugin from webpack 2 when starting in mode --production?

+4
source share
1 answer

Found: https://github.com/webpack/webpack/blob/9734d00d8bf0d306654f40e9b34b60db9c7fdda1/bin/config-optimist.js#L47

optimist
  .boolean("p")
  .describe(
    "p", 
    "shortcut for --optimize-minimize --define process.env.NODE_ENV=\"production\""
  )

Temp workaround will run webpack --define process.env.NODE_ENV=\"production\"insteadwebpack -p

+7
source

Source: https://habr.com/ru/post/1666780/


All Articles