How to build minified and uncompressed bundle with webpack?

Here’s my webpack.config.js

var webpack = require("webpack");

module.exports = {

  entry: "./entry.js",
  devtool: "source-map",
  output: {
    path: "./dist",
    filename: "bundle.min.js"
  },
  plugins: [
    new webpack.optimize.UglifyJsPlugin({minimize: true})
  ]
};

I’m building with

$ webpack

In my dist folder, I’m only getting

  • bundle.min.js
  • bundle.min.js.map

I’d also like to see the uncompressed bundle.js

14 Answers
14

Leave a Comment