added clean-webpack-plugin to webpack build base
This commit is contained in:
@@ -4,6 +4,7 @@ const { VueLoaderPlugin } = require('vue-loader')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const ExtraneousFileCleanupPlugin = require('webpack-extraneous-file-cleanup-plugin');
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
|
||||
const utils = require('./utils')
|
||||
|
||||
@@ -159,5 +160,17 @@ module.exports = {
|
||||
minBytes: 4096
|
||||
}),
|
||||
new CompressionPlugin(),
|
||||
/**
|
||||
* All files inside webpack's output.path directory will be removed once, but the
|
||||
* directory itself will not be. If using webpack 4+'s default configuration,
|
||||
* everything under <PROJECT_DIR>/dist/ will be removed.
|
||||
* Use cleanOnceBeforeBuildPatterns to override this behavior.
|
||||
*
|
||||
* During rebuilds, all webpack assets that are not used anymore
|
||||
* will be removed automatically.
|
||||
*
|
||||
* See `Options and Defaults` for information
|
||||
*/
|
||||
new CleanWebpackPlugin(),
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user