Closed Extarys closed 2 years ago
Sorry for the slow response. I'm almost certain it's an issue in javascript-obfuscator
. rollup-plugin-obfuscator
is merely passing down the options you set to javascript-obfuscator
so if it works with a certain set of options but not another, it smells like an issue in javascript-obfuscator
. :wink:
I tried your reproduce steps but didn't get any error. Could you upgrade javascript-obfuscator
and try again? Mostly likely, the issue has been fixed upstream since you opened this ticket, which is why it works on the newer version of javascript-obfuscator
I just downloaded (v4.0.0).
Sorry for the slow response.
Hey, no worries! :heart:
I'm almost certain it's an issue in javascript-obfuscator. rollup-plugin-obfuscator is merely passing down the options you set to javascript-obfuscator so if it works with a certain set of options but not another, it smells like an issue in javascript-obfuscator. wink
Makes sense.
Could you upgrade javascript-obfuscator and try again?
I will definitely give it a try!
I just downloaded (v4.0.0).
Ohh, new version! How exciting! :heart_eyes:
With
deadCodeInjection
, each seed generate a different error message ending by "is not a function". I doubt this belongs to javascript-obfuscator, but feel free to redirect me there nonetheless if you believe this isn't plugin error :wink:While building the Nuxt project, I also get 1 to 2 warnings:
WARN The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
Steps to reproduce:
npx nuxi new testproject && ce testproject && yarn install
yarn add --dev rollup-plugin-obfuscator javascript-obfuscator
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config export default defineNuxtConfig({ buildModules: [ ], vite: { plugins: [ obfuscator({ exclude: ['node_modules/', '.nuxt/', '.output/**'], fileOptions: false, globalOptions: { compact: true, simplify: true, selfDefending: false, controlFlowFlattening: true, controlFlowFlatteningThreshold: 0.5, deadCodeInjection: true, deadCodeInjectionThreshold: 0.1, stringArrayRotate: true, stringArrayShuffle: true, stringArrayIndexesType: [ 'hexadecimal-numeric-string' ], stringArrayWrappersCount: 2, stringArrayWrappersType: 'function', stringArrayEncoding: ['base64'], identifierNamesGenerator: 'mangled-shuffled', } }), ] } })