Open VijayaSankarN opened 3 months ago
Same question.
After using this plugin:
vite v3.2.10 building for production...
✓ 201 modules transformed.
Not using this plugin:
vite v3.2.10 building for production...
✓ 326 modules transformed.
Oh, finally i solve this by change option ignoreImports
from false
to true
. Guess you can add this option to solve it too.
plugins: [
react(),
obfuscator({
compact: false,
numbersToExpressions: true,
identifierNamesGenerator: 'hexadecimal',
selfDefending: true,
renameGlobals: true,
ignoreImports: true // Add this
}),
]
I have to obfuscate 7173 modules (application in ReactJS CoreUI framework). With this configuration:
All modueles are processed. But any other options added to the above config, like
deadCodeInjection
orsplitStrings
orstringArray
or any other options from https://www.npmjs.com/package/javascript-obfuscator, the number of modules being processed are getting reduced to anything less than 6000 randomly and then build ends without any errors. This prevents the execution of the application overall.What is being missed or is there anything that I need to configure in
vite
orobfuscator
configuration to always ensure that 7173 modules are being executed.I even tried adding space size:
Adding this further affects the number of modules being processed to anywhere between 2000 and 3000. Adjusting the values are of no help.
Without this Obfuscate configuration
vite build
always builds all the modules successfully.