Webpack packaging

  node.js, question

Webpack.config.js changes dist to build in output.
The webpack was packaged successfully but import was not compressed when the page was opened.
What other changes must be made before it can be compressed into the build folder

webpack.config.jsInside to configure the corresponding plug-in:

'use strict';
 var webpack = require('webpack');
 module.exports = {
 entry: {
 index: 'entry.js'
 output: {
 path: 'build/',
 filename: '[hash].[name].bundle.js'
 plugins: [
 new webpack.optimize.UglifyJsPlugin({
 compress: {
 warnings: false