Skip to content

calebmcelroy/javascript-obfuscator-metro-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javascript Obfuscator Metro Plugin

This metro plugin protects your React Native bundle using javascriptobfuscator.com.

Usage

Include the plugin in your metro.config.js:

const jsoMetroPlugin = require('javascript-obfuscator-metro-plugin')(
  {
    APIKey: undefined, /* required */ 
    APIPwd: undefined, /* required */ 
    Name: 'My Project', /* optional */ 
    KeepComment: false, /* optional */
    EncodeStrings: false, /* optional */
    MoveStrings: true, /* optional */
    ReplaceNames: true, /* optional */
    RenameGlobals: true, /* optional */
    DeepObfuscate: true, /* optional */
    ReorderCode: true, /* optional */
    MoveMembers: true, /* optional */
    RenameMembers: true, /* optional */
    OptimizationMode: 'Auto', /* optional */
  },
  {
    runInDev: false, /* optional */
  }
);

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
  ...jsoMetroPlugin
};

For configuration docs see: https://service.javascriptobfuscator.com/httpapi.asmx?op=JSOExecute and https://javascriptobfuscator.com/docs/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages