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