Настройки webpack
This commit is contained in:
@@ -3,6 +3,7 @@ const webpack = require("webpack");
|
||||
|
||||
const merge = require("webpack-merge");
|
||||
const baseWpConfig = require("./webpack.base.config");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
|
||||
module.exports = merge(baseWpConfig, {
|
||||
mode: 'production',
|
||||
@@ -11,7 +12,27 @@ module.exports = merge(baseWpConfig, {
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: "vue-loader",
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
'css-loader'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env": {
|
||||
"NODE_ENV": JSON.stringify("production")
|
||||
}
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: "[name].css"
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user