Skip to content

Obfuscate misses out some modules to obfuscate #150

@VijayaSankarN

Description

@VijayaSankarN

I have to obfuscate 7173 modules (application in ReactJS CoreUI framework). With this configuration:

plugins: [
  react(),
  obfuscator({
    compact: false,
    numbersToExpressions: true,
    identifierNamesGenerator: 'hexadecimal',
    selfDefending: true,
    renameGlobals: true,
  }),
]

All modueles are processed. But any other options added to the above config, like deadCodeInjection or splitStrings or stringArray 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 or obfuscator configuration to always ensure that 7173 modules are being executed.

I even tried adding space size:

{
  "scripts": {
    "build": "cross-env NODE_OPTIONS='--max_old_space_size=8192' vite build"
  }
}

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions