Registry / devops / jscrambler-webpack-plugin

jscrambler-webpack-plugin

JSON →
library8.5.3jsnpmunverified

Webpack plugin (v8.5.3) that integrates Jscrambler Code Integrity to protect JavaScript bundles via obfuscation, anti-tampering, and self-defensive capabilities. Active development with frequent releases tied to Jscrambler API changes. Keys: supports chunk-based protection, bundle/module-level obfuscation, SRI compatibility, and webpack 5 via processAssets hook. Differentiators: enterprise-grade protection with polymorphic transformations, vs free tools like UglifyJS or terser that only minify. Ships TypeScript types.

npm install jscrambler-webpack-plugin
INSTALL
IMPORT
SIG · JSCRAMBLER-WEBPACK
J
jscrambler-webpack-plugin
devopsjavascriptv8.5.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import JscramblerWebpack from 'jscrambler-webpack-plugin'
const JscramblerWebpack = require('jscrambler-webpack-plugin')
Package is ESM-first with named default export. CJS require works in Node 12+ but is not guaranteed in future versions.
JscramblerWebpack
const JscramblerWebpack = require('jscrambler-webpack-plugin')
const { JscramblerWebpack } = require('jscrambler-webpack-plugin')
This is a CommonJS pattern for webpack.config.js files which are often CJS. The default export is the constructor.
Type declarations
import JscramblerWebpack from 'jscrambler-webpack-plugin'
TypeScript types are included. No separate @types package needed.

Minimal webpack config with Jscrambler, using env vars for credentials and protecting the main chunk.

// webpack.config.js const JscramblerWebpack = require('jscrambler-webpack-plugin'); const path = require('path'); module.exports = { mode: 'production', entry: './app/index.js', output: { filename: 'bundle.js', path: path.resolve(__dirname, 'dist') }, plugins: [ new JscramblerWebpack({ enable: true, chunks: ['main'], params: [ { name: 'accessKey', value: process.env.JSCRAMBLER_ACCESS_KEY ?? '' }, { name: 'secretKey', value: process.env.JSCRAMBLER_SECRET_KEY ?? '' }, { name: 'applicationId', value: process.env.JSCRAMBLER_APPLICATION_ID ?? '' } ] }) ] };
Debug
Known issues
breakingVersion 6.0.0 requires Jscrambler >= 7.2. Using older plugin with newer Jscrambler causes failures
fix
Ensure Jscrambler version >= 7.2 or use plugin <= 5.x.x for Jscrambler <= 7.1
affects: >=6.0.0
gotchaSetting obfuscationLevel to 'module' disables source maps. Source maps will not be generated.
fix
If source maps are needed, use obfuscationLevel: 'bundle' (default)
affects: *
gotchawebpack-subresource-integrity plugin must run after JscramblerWebpackPlugin, otherwise SRI hashes will mismatch
fix
Ensure SubresourceIntegrityPlugin is added after JscramblerWebpack in the plugins array
affects: *
deprecatedThe obfuscationHook: 'emit' option is deprecated in webpack 5. Use 'processAssets' instead.
fix
Remove obfuscationHook 'emit' or set to 'processAssets'
affects: >=8.0.0
gotchaChunks option requires exact chunk names from entry. Misspelled chunk names silently protect no chunks.
fix
Verify chunk names match your webpack entry names exactly
affects: *
breakingJscramblerAccessToken replacement: old tokens stop working after migration, causing authorization errors
fix
Regenerate tokens in Jscrambler dashboard and update .jscramblerrc
affects: >=7.0.0
gotchaPlugin requires network access to Jscrambler API at build time. Offline builds will fail.
fix
Ensure CI/CD runners have outbound HTTPS access to api.jscrambler.com
affects: *
Errors
Common errors & fixes
Error: Jscrambler is not defined
Using import { JscramblerWebpack } instead of the default export
fix
Use import JscramblerWebpack from 'jscrambler-webpack-plugin' or const JscramblerWebpack = require('jscrambler-webpack-plugin')
JSCRAMBLER_ERROR: Application not found or inactive
Invalid applicationId or application is deactivated
fix
Check applicationId in .jscramblerrc or plugin options, and verify application is active in Jscrambler dashboard
TypeError: JscramblerWebpack is not a constructor
Importing as named export instead of default
fix
Use const JscramblerWebpack = require('jscrambler-webpack-plugin').default for ESM or default import
Error: Invalid hook 'processAssets', webpack 4 does not support this hook
Using obfuscationHook: 'processAssets' with webpack 4
fix
Use obfuscationHook: 'emit' for webpack 4, or upgrade to webpack 5
Error: Cannot find module 'jscrambler-webpack-plugin'
Package not installed
fix
Run npm install jscrambler-webpack-plugin
Upgrade
Version history
8.5.3latest on npm
Audit
Dependencies
webpackrequiredPlugin API dependency
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources