Добавил clean-webpack-plugin
This commit is contained in:
@@ -4,6 +4,7 @@ const webpack = require("webpack");
|
||||
const merge = require("webpack-merge");
|
||||
const baseWpConfig = require("./webpack.base.config");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
|
||||
module.exports = merge(baseWpConfig, {
|
||||
mode: 'production',
|
||||
@@ -23,6 +24,7 @@ module.exports = merge(baseWpConfig, {
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin([`${baseWpConfig.output.path}/*.*`], {root: path.resolve(__dirname, '..')}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: "[name].css"
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user