6.5.2 • Published 4 days ago

jscrambler-webpack-plugin v6.5.2

Weekly downloads
1,108
License
MIT
Repository
github
Last release
4 days ago

Jscrambler Webpack Plugin

This plugin protects your webpack output using Jscrambler.

Version Compatibility


The version's compatibility table match your Jscrambler Version with the Jscrambler Webpack Plugin. Please make sure you install the right version, otherwise some functionalities might not work properly.

Jscrambler VersionClient and Integrations
<= 7.1<= 5.x.x
>= 7.2>= 6.0.0

Usage

Simply add the plugin to your configuration. We recommend placing it after every other plugin that also modifies your code. It will automatically gather all JavaScript and HTML files and protect them.

Example webpack.config.js:

const {resolve} = require('path');
const JscramblerWebpack = require('jscrambler-webpack-plugin');

module.exports = {
  mode: 'production',
  entry: {
    protected: './app/index.js',
    unprotected: './app/index.js'
  },
  output: {
    filename: 'dist/[name].js'
  },
  devtool: 'source-map',
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: 'babel-loader'
      }
    ]
  },
  plugins: [
    new JscramblerWebpack({
      enable: true, // OPTIONAL, defaults to true
      chunks: ['protected'], // OPTIONAL, defaults to all chunks
      ignoreFile: resolve(__dirname, '.jscramblerignore'), // OPTIONAL, defaults to no ignore file
      params: [], 
      obfuscationLevel: 'bundle', // OPTIONAL. Available options are: bundle (default) or module
      obfuscationHook: 'emit' // OPTIONAL. Available options are: emit (default) or processAssets  
      // and other jscrambler configurations
    })
  ]
};

The Jscrambler client will use .jscramblerrc as usual, though it is possible to override specific values using the plugin's configuration.

The ignoreFile option will tell Jscrambler the path to the .jscramblerignore file. You can find more informations and examples in Ignoring Files.

Additionally, you may specify which chunks to protect using the chunks property, which accepts an array with the names of the chunks you wish to protect.

Obfuscation level

You can obfuscation the entire bundle (default way) or the modules inside it. The latter option is required when the native APIs (or polyfills) are not available right at the beginning of the application runtime.

Early versions of NativeScript mobile framework (<= 6) are a good example of this behaviour, and in order to protect those NativeScript Applications with Jscrambler you must set obfuscationLevel to module.

Note: Ofuscation level module is not compatible with source maps.

Obfuscation Hook

There are some webpack plugins, such as webpack-subresources-integrity, that should run after the obfuscation step. If those plugin are taking advantage of the new processAssets compilation hook (available on webpack 5 and onwards) to perform their tasks, that creates an incompatibility with the jscrambler-webpack-plugin.

If your use case matches the one describe above, please set obfuscationHook: processAssets (Only for webpack >= 5)

6.5.2

4 days ago

6.5.1

16 days ago

6.5.0

1 month ago

9.0.0-alpha.1

1 month ago

6.4.33-alpha.0

2 months ago

6.4.32

2 months ago

6.4.31

2 months ago

6.4.30

2 months ago

6.4.29

2 months ago

6.4.28

4 months ago

6.4.25

4 months ago

6.4.27

4 months ago

6.4.26

4 months ago

6.4.23

4 months ago

6.4.24

4 months ago

6.4.21

5 months ago

6.4.20

5 months ago

6.4.18

8 months ago

6.4.17

8 months ago

6.4.19

7 months ago

6.4.16

8 months ago

6.4.15

8 months ago

6.4.12

10 months ago

6.4.14

9 months ago

6.4.7

1 year ago

6.4.9

1 year ago

6.4.8

1 year ago

6.4.10

1 year ago

6.3.0

1 year ago

6.3.2

1 year ago

6.4.3

1 year ago

6.4.2

1 year ago

6.4.5

1 year ago

6.4.4

1 year ago

6.4.6

1 year ago

6.4.1

1 year ago

6.4.0

1 year ago

6.2.5

2 years ago

6.2.4

2 years ago

6.2.7

2 years ago

6.2.6

2 years ago

6.2.8

2 years ago

6.2.3

2 years ago

6.2.2

2 years ago

6.1.4

2 years ago

6.1.3

2 years ago

6.2.1

2 years ago

6.2.0

2 years ago

6.1.6

2 years ago

6.1.5

2 years ago

6.1.2

2 years ago

6.1.0

2 years ago

6.1.1

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.2

2 years ago

6.0.4

2 years ago

5.5.35

3 years ago

5.5.34

3 years ago

5.5.32

3 years ago

5.5.31

3 years ago

5.5.25

3 years ago

5.5.24

3 years ago

5.5.23

3 years ago

5.5.21

3 years ago

5.5.20

3 years ago

5.5.18

3 years ago

5.5.17

3 years ago

5.5.14

4 years ago

5.5.13

4 years ago

5.5.12

4 years ago

5.5.11

4 years ago

5.5.10

4 years ago

5.5.9

4 years ago

5.5.8

4 years ago

5.5.7

4 years ago

5.5.6

4 years ago

5.5.5

4 years ago

5.5.4

4 years ago

5.5.3

4 years ago

5.5.0

4 years ago

5.4.3

4 years ago

5.4.2

4 years ago

5.4.0

5 years ago

5.3.8

5 years ago

5.3.5

5 years ago

5.3.4

5 years ago

5.3.3

5 years ago

5.3.2

5 years ago

5.3.1

5 years ago

5.3.0

5 years ago

5.2.19

5 years ago

5.2.18

5 years ago

5.2.17

6 years ago

5.2.16

6 years ago

5.2.15

6 years ago

5.2.14

6 years ago

5.2.13

6 years ago

5.2.12

6 years ago

5.2.11

6 years ago

5.2.10

6 years ago

5.2.9

6 years ago

5.2.8

6 years ago

5.2.6

6 years ago

5.2.1

6 years ago

5.2.0

6 years ago

1.3.8

6 years ago

1.3.7

6 years ago

1.3.6

6 years ago

1.3.5

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago