Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to obfuscate select multiple .vue file in nuxt2 #162

Open
wachirachoomsiri opened this issue May 26, 2023 · 0 comments
Open

how to obfuscate select multiple .vue file in nuxt2 #162

wachirachoomsiri opened this issue May 26, 2023 · 0 comments

Comments

@wachirachoomsiri
Copy link

wachirachoomsiri commented May 26, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant