提交 4dbd40ee 作者: 毛细亚

优化初始化工具

上级 f7ca3cc5
module.exports = {
simple: {
compact: true,
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
// controlFlowFlattening: false,
// deadCodeInjection: false,
// debugProtection: false,
// debugProtectionInterval: false,
// disableConsoleOutput: true,
// identifierNamesGenerator: "hexadecimal",
// log: false,
// renameGlobals: false,
// rotateStringArray: true,
// selfDefending: true,
// stringArray: true,
// stringArrayEncoding: false,
// stringArrayThreshold: 0.75,
// unicodeEscapeSequence: false,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: "hexadecimal",
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
stringArray: true,
stringArrayEncoding: false,
stringArrayThreshold: 0.75,
unicodeEscapeSequence: false,
},
ordinary: {
compact: true,
......
// import moment from 'moment'
// // 引入中文
// import 'moment/locale/zh-cn'
// // 设置中文
// moment.locale('zh-cn');
// let momentStr = moment().subtract(10, 'days').calendar();
// console.log('现在时间:', momentStr);
// import dome from './dome'
let obj = {name:'小明',age:'12',action(){
console.log('[ 在上学 ]',demo)
......
......@@ -14,12 +14,11 @@ let ObfuscatorType = {};
let
entry = {},
output = {};
// 处理entry和output
function configInfi() {
entryFiles.forEach(dir => {
entry[dir] = path.resolve(__dirname, `${entryDir}/${dir}`)
output.filename = "js/[name].min[hash].js";
output.filename = "js/[name].min[hash:5].js";
output.path = outputDir;
})
......@@ -49,9 +48,6 @@ module.exports={
entry,
output,
plugins:[
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/node_modules\/moment\//,
}),
new webpack.NoEmitOnErrorsPlugin(),
new CleanWebpackPlugin( {
root: resolve(""), // 设置根节点
......@@ -59,9 +55,6 @@ module.exports={
dry: false,
}),
new WebpackObfuscator (ObfuscatorType),
// 忽略解析三方包里插件
]
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论