upgraded all npm packages (webpack 5, eslint 7, etc) and activated eslint
This commit is contained in:
@@ -78,10 +78,14 @@ module.exports = {
|
||||
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
path: utils.resolve(themePath + '/assets/dist/'),
|
||||
filename: '[name].css'
|
||||
}),
|
||||
new VueLoaderPlugin()
|
||||
// new ESLintPlugin()
|
||||
new VueLoaderPlugin(),
|
||||
new ESLintPlugin({
|
||||
// exclude: ['node_modules', 'vendor', 'web/core']
|
||||
// cache: false,
|
||||
// ignore: true,
|
||||
// useEslintrc: false,
|
||||
})
|
||||
]
|
||||
}
|
||||
|
@@ -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");
|
||||
|
||||
|
@@ -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')
|
||||
})
|
||||
]
|
||||
})
|
||||
|
Reference in New Issue
Block a user