How to build minified and uncompressed bundle with webpack?

前端 未结 14 1125
囚心锁ツ
囚心锁ツ 2020-11-29 14:52

Here\'s my webpack.config.js

var webpack = require(\"webpack\");

module.exports = {

  entry: \"./entry.js\",
  devtool: \"source-map\",
  outp         


        
14条回答
  •  自闭症患者
    2020-11-29 15:25

    You can create two configs for webpack, one that minifies the code and one that doesn't (just remove the optimize.UglifyJSPlugin line) and then run both configurations at the same time $ webpack && webpack --config webpack.config.min.js

提交回复
热议问题