javascript-obfuscator / javascript-obfuscator/webpack-obfuscator

how to obfuscate select multiple .vue file in nuxt2

Open
#162 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
928
Forks
92
PR merge metrics
No merged PRs in 30d

Description

```var WebpackObfuscator = require('webpack-obfuscator');
extend(config, { isDev, isClient }) {
config.resolve.alias['vue'] = 'vue/dist/vue.common';
if (!isDev && isClient) {
config.plugins.push(
new WebpackObfuscator({
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
rotateStringArray: true,
splitStrings: true,
splitStringsChunkLength: 5,
splitStrings: true,
compact: true,
simplify: true,
stringArrayShuffle: true,
disableConsoleOutput: true,
debugProtection: false,
identifierNamesGenerator: 'hexadecimal',
numbersToExpressions: false,
stringArrayEncoding: ['base64'],
}, ['node_modules/**/*.js'])
)
}
}
},
```

```
"javascript-obfuscator": "^2.19.1",
"webpack-obfuscator": "^2.6.0"
```

this code work with all file include. but I need to obfuscate with only 2 selected file.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Nuxt2 webpack extend configuration and the webpack-obfuscator options shown in the issue, then check how the plugin's file-selection pattern is applied. Done means documenting or confirming a configuration that obfuscates only the two selected files rather than all matching files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nuxtjs, webpack
Domain
build-system, tooling
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.