javascript-obfuscator / webpack-obfuscator

javascript-obfuscator plugin for Webpack
https://github.com/javascript-obfuscator/javascript-obfuscator
BSD 2-Clause "Simplified" License
876 stars 82 forks source link

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

Open wachirachoomsiri opened 1 year ago

wachirachoomsiri commented 1 year ago
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.