fixed webpack prod, fixed language prefix negociation in vue-router
This commit is contained in:
@@ -1,21 +1,37 @@
|
||||
'use strict'
|
||||
|
||||
const webpack = require('webpack')
|
||||
const merge = require('webpack-merge')
|
||||
const baseConfig = require('./webpack.config.base')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
module.exports = merge(baseConfig, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
commons: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: "vendor",
|
||||
chunks: "all",
|
||||
},
|
||||
},
|
||||
},
|
||||
minimizer: [
|
||||
new UglifyJSPlugin({
|
||||
uglifyOptions: {
|
||||
// Eliminate comments
|
||||
comments: false,
|
||||
compress: {
|
||||
// remove warnings
|
||||
warnings: false,
|
||||
// Drop console statements
|
||||
drop_console: true,
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
// splitChunks: {
|
||||
// cacheGroups: {
|
||||
// commons: {
|
||||
// test: /[\\/]node_modules[\\/]/,
|
||||
// name: "vendor",
|
||||
// chunks: "all",
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -26,7 +42,7 @@ module.exports = merge(baseConfig, {
|
||||
'css-loader'
|
||||
]
|
||||
}, {
|
||||
test: /\.styl(us)?$/,
|
||||
test: /\.scss?$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
'css-loader',
|
||||
|
Reference in New Issue
Block a user