upgraded all npm packages (webpack 5, eslint 7, etc) and activated eslint

This commit is contained in:
2020-11-25 21:39:40 +01:00
parent f002c81008
commit 8b709a42c3
7 changed files with 3251 additions and 3141 deletions

View File

@@ -1,7 +1,7 @@
'use strict'
const webpack = require('webpack')
const merge = require('webpack-merge')
const { merge } = require('webpack-merge')
const baseConfig = require('./webpack.config.base')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const TerserPlugin = require("terser-webpack-plugin");
@@ -40,18 +40,26 @@ module.exports = merge(baseConfig, {
minimize: true,
minimizer: [
new TerserPlugin({
sourceMap: true, // Must be set to true if using source-maps in production
parallel: true,
test: /\.(js|vue)$/,
// extractComments: true
terserOptions: {
compress: {
drop_console: true,
// drop_console: true,
pure_funcs: [
'console.log',
'console.info',
'console.debug'
// 'console.warn'
]
},
},
})
],
},
// ,
// plugins: []
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
})
]
})