Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
vite-plugin-javascript-obfuscator
Advanced tools
Readme
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 1,659 weekly downloads. As such, vite-plugin-javascript-obfuscator popularity was classified as popular.
We found that vite-plugin-javascript-obfuscator demonstrated a healthy version release cadence and project activity because the last version was released less than 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
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.