javascript-obfuscator / javascript-obfuscator/webpack-obfuscator

Vue 3 project strange behaviors

Aperta
#126 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
928
Fork
92
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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:
![image](https://user-images.githubusercontent.com/11581433/134577182-5fc2b1de-3ded-477b-be4a-a6a9a55fb4b7.png)

Seed 905555:
![image](https://user-images.githubusercontent.com/11581433/134577252-0c0f9fe2-f5eb-40e0-a315-cd813eef5580.png)

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`

![image](https://user-images.githubusercontent.com/11581433/134577760-a708517c-7af5-44de-882b-a27e1572eade.png)

Am I missing something I should be doing ? Or is it an issue with webpack-obfuscator?
Might be related to #123

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia dalla configurazione del progetto Vue 3 riportata in vue.config.js e riproduci gli errori della console usando le opzioni e i seed di webpack-obfuscator mostrati. Confronta l’errore del selettore e l’errore charAt tra le configurazioni, quindi esamina la discussione o i risultati nella issue correlata #123. Il lavoro è completato quando viene identificata un’incompatibilità riproducibile o un’esclusione/configurazione specifica che impedisce gli errori.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, webpack
Ambito
build-system, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.