Добавил clean-webpack-plugin
This commit is contained in:
@@ -3,11 +3,11 @@ const webpack = require("webpack");
|
||||
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: [path.resolve(__dirname, "../client/main.js")],
|
||||
entry: [path.resolve(__dirname, '../client/main.js')],
|
||||
output: {
|
||||
path: path.resolve(__dirname, "../server/public/app"),
|
||||
publicPath: "/app/",
|
||||
filename: "bundle.js"
|
||||
path: path.resolve(__dirname, '../server/public/app'),
|
||||
publicPath: '/app/',
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
|
||||
module: {
|
||||
|
||||
@@ -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"
|
||||
})
|
||||
|
||||
9
package-lock.json
generated
9
package-lock.json
generated
@@ -1879,6 +1879,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"clean-webpack-plugin": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-1.0.0.tgz",
|
||||
"integrity": "sha512-+f96f52UIET4tOFBbCqezx7KH+w7lz/p4fA1FEjf0hC6ugxqwZedBtENzekN2FnmoTF/bn1LrlkvebOsDZuXKw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"rimraf": "^2.6.1"
|
||||
}
|
||||
},
|
||||
"cli-cursor": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.5",
|
||||
"babel-preset-env": "^1.3.2",
|
||||
"clean-webpack-plugin": "^1.0.0",
|
||||
"css-loader": "^1.0.0",
|
||||
"element-theme-chalk": "^2.4.11",
|
||||
"eslint": "^5.11.1",
|
||||
|
||||
Reference in New Issue
Block a user