mirror of
https://github.com/twofas/2fas-browser-extension.git
synced 2024-11-23 10:39:57 +01:00
#1513 Production optimizations
This commit is contained in:
parent
701145c1fd
commit
0165829524
4
.babelrc
4
.babelrc
@ -5,7 +5,9 @@
|
||||
},
|
||||
"modules": "commonjs"
|
||||
}], ["minify", {
|
||||
"builtIns": false
|
||||
"builtIns": false,
|
||||
"keepFnName": true,
|
||||
"removeDebugger": true
|
||||
}]],
|
||||
"env": {
|
||||
"production": {
|
||||
|
@ -25,7 +25,6 @@ const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
|
||||
const backgroundProdConfig = {
|
||||
name: 'background',
|
||||
@ -64,14 +63,20 @@ const backgroundProdConfig = {
|
||||
constants: 'constants'
|
||||
},
|
||||
optimization: {
|
||||
moduleIds: 'named',
|
||||
chunkIds: 'size',
|
||||
moduleIds: 'size',
|
||||
concatenateModules: true,
|
||||
mangleExports: 'size',
|
||||
removeAvailableModules: true,
|
||||
removeEmptyChunks: true,
|
||||
mergeDuplicateChunks: true,
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin(),
|
||||
new CssMinimizerPlugin()
|
||||
]
|
||||
new TerserPlugin({
|
||||
parallel: true
|
||||
})
|
||||
],
|
||||
nodeEnv: 'production'
|
||||
},
|
||||
resolve: {
|
||||
modules: ['node_modules']
|
||||
|
@ -72,14 +72,21 @@ const contentScriptProdConfig = {
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
moduleIds: 'named',
|
||||
chunkIds: 'size',
|
||||
moduleIds: 'size',
|
||||
concatenateModules: true,
|
||||
mangleExports: 'size',
|
||||
removeAvailableModules: true,
|
||||
removeEmptyChunks: true,
|
||||
mergeDuplicateChunks: true,
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin(),
|
||||
new TerserPlugin({
|
||||
parallel: true
|
||||
}),
|
||||
new CssMinimizerPlugin()
|
||||
]
|
||||
],
|
||||
nodeEnv: 'production'
|
||||
},
|
||||
plugins: [
|
||||
new ESLintPlugin({
|
||||
|
@ -97,14 +97,21 @@ const installPageProdConfig = {
|
||||
constants: 'constants'
|
||||
},
|
||||
optimization: {
|
||||
moduleIds: 'named',
|
||||
chunkIds: 'size',
|
||||
moduleIds: 'size',
|
||||
concatenateModules: true,
|
||||
mangleExports: 'size',
|
||||
removeAvailableModules: true,
|
||||
removeEmptyChunks: true,
|
||||
mergeDuplicateChunks: true,
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin(),
|
||||
new TerserPlugin({
|
||||
parallel: true
|
||||
}),
|
||||
new CssMinimizerPlugin()
|
||||
]
|
||||
],
|
||||
nodeEnv: 'production'
|
||||
},
|
||||
resolve: {
|
||||
modules: ['node_modules']
|
||||
|
@ -108,14 +108,21 @@ const optionsPageProdConfig = {
|
||||
constants: 'constants'
|
||||
},
|
||||
optimization: {
|
||||
moduleIds: 'named',
|
||||
chunkIds: 'size',
|
||||
moduleIds: 'size',
|
||||
concatenateModules: true,
|
||||
mangleExports: 'size',
|
||||
removeAvailableModules: true,
|
||||
removeEmptyChunks: true,
|
||||
mergeDuplicateChunks: true,
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin(),
|
||||
new TerserPlugin({
|
||||
parallel: true
|
||||
}),
|
||||
new CssMinimizerPlugin()
|
||||
]
|
||||
],
|
||||
nodeEnv: 'production'
|
||||
},
|
||||
resolve: {
|
||||
modules: ['node_modules']
|
||||
|
Loading…
Reference in New Issue
Block a user