Files
liberama/build/webpack.prod.config.js
2018-12-28 19:34:26 +07:00

36 lines
870 B
JavaScript

const path = require("path");
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',
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader",
},
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader'
]
}
]
},
plugins: [
new webpack.DefinePlugin({
"process.env": {
"NODE_ENV": JSON.stringify("production")
}
}),
new MiniCssExtractPlugin({
filename: "[name].css"
})
]
});