Thursday, 20 April 2017

uglify bundle file and have them both in webpack?

entry: './app.js',
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: "bundle.js"
    },
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /(node_modules)/,
          use: {
            loader: 'babel-loader',
              options: {
                presets: ['env', 'es2015', 'stage-2']
              }
          }
        }
      ]
    }

this is my webpack config and it gives me the bundle.js file in dist directory. I want to uglify this bundle.js and want both bundle.js and bundle.min,js be present in the dist directory. Help is very much appreciated.



via ShocKwav3_

No comments:

Post a Comment