提交 4dbd40ee 作者: 毛细亚

优化初始化工具

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