javascript-obfuscator / javascript-obfuscator/webpack-obfuscator
Vue 2 webapp fails to build (Webpack)
- 主要语言
- TypeScript
- 星标
- 928
- 派生
- 92
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi
Versions:
`
"webpack-obfuscator": "^2.6.0",
"@vue/cli-service": "^4.5.13",
"vue": "^2.6.11",
`
I am trying to obfuscate my vue.js 2 webapp. My cue.config.js looks like this
`const fs = require('fs')
module.exports = {
chainWebpack: config => {
config.module.rules.delete('eslint')
var JavaScriptObfuscator = require('webpack-obfuscator');
config.plugin('obfuscation').enforce = 'post';
config.plugin('obfuscation').use(JavaScriptObfuscator, [
{
compact: false,
controlFlowFlattening: false,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: false,
deadCodeInjectionThreshold: 0.4,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: false,
identifierNamesGenerator: 'hexadecimal',
log: true,
numbersToExpressions: false,
renameGlobals: false,
selfDefending: false,
simplify: false,
splitStrings: false,
splitStringsChunkLength: 10,
stringArray: false,
stringArrayEncoding: ['base64'],
stringArrayIndexShift: false,
stringArrayRotate: false,
stringArrayThreshold: 0.75,
stringArrayShuffle: true,
stringArrayWrappersCount: 2,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersParametersMaxCount: 4,
sourceMap: false,
stringArrayWrappersType: 'function',
transformObjectKeys: false,
target: 'node',
unicodeEscapeSequence: false
}, []]);
},
outputDir: process.env.OUTPUT_DIR
}`
I disabled all options but i cannot get it to work. As soon as i run `npm run serve --open` the app is compiled and the browser opens, but i get no output (i should be redirected to the login page of my app). Instead i get the attached error in my browser console
Im unsure what i am doing wrong here

e
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 cue.config.js 中的 webpack 配置开始,并使用 npm run serve --open 重现该问题。将附图中显示的浏览器控制台错误与 webpack-obfuscator 和 Vue CLI 的设置进行比较。当 webapp 构建并打开登录页面,且不再出现报告的浏览器错误时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, webpack
- 领域
- build-system, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100