
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@bytehide/next-shield
Advanced tools
@bytehide/next-shield
is a powerful plugin for Next.js projects that enables JavaScript obfuscation to enhance the security of your codebase. This plugin integrates seamlessly with your Next.js build process to obfuscate sensitive files, protecting your intellectual property.
Install the plugin using npm or yarn:
npm install @bytehide/next-shield --save-dev
To use the @bytehide/next-shield
, create a custom next.config.js
file and configure the plugin:
const { createShield } = require('@bytehide/next-shield');
const nextConfig: NextConfig = {
/* Config options here */
// reactStrictMode: true,
// distDir: 'build',
};
const shieldConfig = createShield({
projectToken: 'your-project-token', // Required: Your ByteHide project token
replace: true, // Optional: Replace original files
controlFlowFlattening: true, // Optional: Enable control flow flattening
debugProtection: false, // Optional: Enable debug protection
devtoolsBlocking: false, // Optional: Enable devtools blocking
exclude: ['_document.js'], // Optional: Exclude specific files
}, nextConfig);
module.exports = shieldConfig;
Option | Type | Default | Description |
---|---|---|---|
projectToken | string | Required | Token provided by ByteHide for obfuscation. |
replace | boolean | false | Whether to replace original files with obfuscated versions. |
obfuscatedExtension | string | .obf | File extension for obfuscated files. |
controlFlowFlattening | boolean | true | Enhance obfuscation by flattening control flow in the code. |
debugProtection | boolean | false | Prevent debugging tools from analyzing your code. |
devtoolsBlocking | boolean | false | Block browser developer tools. |
exclude | string[] | [] | List of filenames to exclude from obfuscation. |
.next/
by default).Here’s how an obfuscated file is generated:
pages/index.js
pages/index.obf.js
(if replace
is false
) or replaces the original file.This project is licensed under the MIT License. See the LICENSE file for details.
Happy coding but keep it safe with @bytehide/next-shield
! 🛡️
FAQs
Next.js plugin for ByteHide Shield obfuscation.
The npm package @bytehide/next-shield receives a total of 102 weekly downloads. As such, @bytehide/next-shield popularity was classified as not popular.
We found that @bytehide/next-shield demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.