
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
vite-plugin-javascript-obfuscator
Advanced tools
A Vite Plugin for javascript-obfuscator
Install the package:
npm install --save-dev vite-plugin-javascript-obfuscator
yarn add --dev vite-plugin-javascript-obfuscator
pnpm i vite-plugin-javascript-obfuscator -D
vite.config.js
import obfuscatorPlugin from "vite-plugin-javascript-obfuscator";
export default defineConfig({
plugins: [
obfuscatorPlugin({
options: {
// your javascript-obfuscator options
debugProtection: true,
// ... [See more options](https://github.com/javascript-obfuscator/javascript-obfuscator)
},
}),
],
});
vite.config.js
import obfuscatorPlugin from "vite-plugin-javascript-obfuscator";
export default defineConfig({
plugins: [
obfuscatorPlugin({
include: ["src/path/to/file.js", "path/anyjs/**/*.js", /foo.js$/],
exclude: [/node_modules/],
apply: "build",
debugger: true,
options: {
// your javascript-obfuscator options
debugProtection: true,
// ... [See more options](https://github.com/javascript-obfuscator/javascript-obfuscator)
},
}),
],
});
Name | Type | Default | Description |
---|---|---|---|
include | Array|String|RegExp|Function | [/\.(jsx?|tsx?|cjs|mjs)$/] | Configure this option to include files |
exclude | Array|String|RegExp|Function | [/node_modules/, /\.nuxt/] | Configure this option to exclude files |
options | Object | javascript-obfuscator default options | See more options |
apply | 'serve' | 'build' | both serve and build. | By default plugins are invoked for both serve and build. In cases where a plugin needs to be conditionally applied only during serve or build, use the apply property to only invoke them during vite build or vite serve |
debugger | Boolean | false | Used for debugging, Print out the path of matching or excluding files. |
FAQs
A Vite Plugin for javascript-obfuscator
The npm package vite-plugin-javascript-obfuscator receives a total of 5,126 weekly downloads. As such, vite-plugin-javascript-obfuscator popularity was classified as popular.
We found that vite-plugin-javascript-obfuscator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.