Vue 2 webapp fails to build (Webpack)

未关闭
#130 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, webpack

调研方向

从 cue.config.js 中的 webpack 配置开始,并使用 npm run serve --open 重现该问题。将附图中显示的浏览器控制台错误与 webpack-obfuscator 和 Vue CLI 的设置进行比较。当 webapp 构建并打开登录页面,且不再出现报告的浏览器错误时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

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

js obfuscator
e

主要语言
TypeScript
星标
930
派生
92
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

javascript-obfuscator/webpack-obfuscator 的其他 Issue

查看 javascript-obfuscator/webpack-obfuscator 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。