mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-09-04 17:46:30 +00:00
updated minimization in production
This commit is contained in:
1
package-lock.json
generated
1
package-lock.json
generated
@@ -43,6 +43,7 @@
|
||||
"sass": "^1.69.5",
|
||||
"sass-loader": "^13.3.2",
|
||||
"style-loader": "^3.3.3",
|
||||
"terser-webpack-plugin": "^5.3.9",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-fix-style-only-entries": "^0.6.1"
|
||||
|
@@ -32,11 +32,10 @@
|
||||
"classnames": "^2.3.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.8.1",
|
||||
"css-minimizer-webpack-plugin": "^5.0.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"locks": "^0.2.2",
|
||||
"mini-css-extract-plugin": "^2.7.6",
|
||||
"sass": "^1.69.5",
|
||||
"css-minimizer-webpack-plugin": "^5.0.1",
|
||||
"postcss-loader": "^7.3.3",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^18.2.0",
|
||||
@@ -45,8 +44,10 @@
|
||||
"react-router": "^6.17.0",
|
||||
"react-router-dom": "^6.17.0",
|
||||
"resolve-url-loader": "^5.0.0",
|
||||
"sass": "^1.69.5",
|
||||
"sass-loader": "^13.3.2",
|
||||
"style-loader": "^3.3.3",
|
||||
"terser-webpack-plugin": "^5.3.9",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-fix-style-only-entries": "^0.6.1"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const path = require('path');
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
const isProduction = argv.mode === 'production';
|
||||
@@ -126,12 +127,14 @@ module.exports = (env, argv) => {
|
||||
},
|
||||
plugins: [new MiniCssExtractPlugin()],
|
||||
optimization: {
|
||||
minimize: isProduction,
|
||||
minimizer: [
|
||||
new MiniCssExtractPlugin(
|
||||
{
|
||||
filename: "[name].css"
|
||||
}
|
||||
),
|
||||
new TerserPlugin()
|
||||
],
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user