生产
This commit is contained in:
@@ -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$/)
|
||||
|
||||
Reference in New Issue
Block a user