fixed webpack prod, fixed language prefix negociation in vue-router

This commit is contained in:
2019-06-06 17:37:43 +02:00
parent 082e011fbb
commit f0120ba10b
10 changed files with 1141 additions and 448 deletions

View File

@@ -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',