javascript-obfuscator / javascript-obfuscator/webpack-obfuscator
Vue 3 project strange behaviors
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 928
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
I'm not quite sure how to structure this issue, so here it goes.
I created a Vue 3 project with webpack and typescript, then modified the `vue.config.js` file and tested some options. **I'm not sure if there is a function name or a file I'm expected to exclude somehow.**
Seed is 0, most of the time I get console errors, sometimes it works in different ways.
```
const WebpackObfuscator = require('webpack-obfuscator');
module.exports = {
transpileDependencies: true,
configureWebpack: {
plugins: [
new WebpackObfuscator({
compact: true,
rotateStringArray: true
})
]
}
};
```
Seed 9055:

Seed 905555:

Seed 221155
Page empty: Console error:
`Uncaught DOMException: Document.querySelector: 'style[data-vue-ssr-id~=\x22449b31f0:0\x22]' is not a valid selector`
With more options:
```
new WebpackObfuscator({
compact: true,
identifierNamesGenerator: 'mangled-shuffled',
rotateStringArray: true,
seed: 0,
selfDefending: true,
shuffleStringArray: true,
simplify: true,
stringArray: true,
stringArrayIndexesType: [
'hexadecimal-number'
],
stringArrayEncoding: ['base64'],
stringArrayIndexShift: true,
stringArrayWrappersCount: 1,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersParametersMaxCount: 2,
stringArrayWrappersType: 'variable',
stringArrayThreshold: 0.75,
target: 'browser',
})
```
Console error `Uncaught TypeError: can't access property "charAt", G is undefined`

Am I missing something I should be doing ? Or is it an issue with webpack-obfuscator?
Might be related to #123
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported Vue 3 project configuration in vue.config.js and reproduce the console failures using the shown webpack-obfuscator options and seeds. Compare the selector error and the charAt error across configurations, then review the discussion or findings in related issue #123. Done means identifying a reproducible incompatibility or a specific exclusion/configuration that prevents the failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, webpack
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100