optimize userscript size

This commit is contained in:
Gabe Yuan
2023-08-09 17:33:51 +08:00
parent 5fe633b2f2
commit 949deb3c8e
6 changed files with 67 additions and 9 deletions

View File

@@ -109,7 +109,7 @@ const userscriptWebpack = (config, env) => {
};
config.output.filename = "[name].js";
config.output.publicPath = "./";
config.output.publicPath = env === "production" ? "./" : "/";
config.optimization.splitChunks = { cacheGroups: { default: false } };
config.optimization.runtimeChunk = false;
config.optimization.minimize = false;