This commit is contained in:
hackrobot
2025-04-02 06:37:39 -05:00
parent b19329182b
commit bd9794d50f

View File

@@ -38,6 +38,7 @@ const config = {
chunkFilename: "static/css/[name].[contenthash:8].css",
},
]);
if (process.env.NODE_ENV === "production") {
// js代码混淆
chain.plugin("obfuscator").use(WebpackObfuscator, [
{
@@ -57,6 +58,8 @@ const config = {
},
["**/*.js", "!node_modules/**"], // 避免对 node_modules 进行混淆
]);
}
chain.module
.rule("markdown")
.test(/\.md$/)