
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
vite-plugin-pac
Advanced tools
vite-plugin-pac is a Vite plugin that serves PAC (Proxy Auto-Configuration) files during development. It provides a zero-configuration setup with sensible defaults, while also allowing customization of the PAC file's path and content.
Install the plugin with your favorite package manager:
# npm
npm install -D vite-plugin-pac
# yarn
yarn add -D vite-plugin-pac
# pnpm
pnpm add -D vite-plugin-pac
Add the plugin to your Vite configuration file:
// vite.config.ts
import { defineConfig } from "vite"
import { vitePluginPAC } from "vite-plugin-pac"
export default defineConfig({
plugins: [
vitePluginPAC({
path: "/proxy.pac", // Optional: Customize the PAC file path
content: `
function FindProxyForURL(url, host) {
// Example: Use a proxy
return "PROXY proxy.example.com:8080";
}
`, // Optional: Customize the PAC file content
}),
],
})
By default, the plugin will:
/proxy.pacThe plugin supports the following options:
| Option | Type | Default Value | Description |
|---|---|---|---|
path | string | /proxy.pac | The URL path for the PAC file. |
content | string | A default PAC script returning "DIRECT" | The content of the PAC file. |
function FindProxyForURL(url, host) {
// Default proxy configuration
return "DIRECT"
}
To build the project, use:
npm run build
To run tests, use:
npm test
To check for linting issues, use:
npm run lint
Contributions are welcome! Feel free to open issues or submit pull requests on GitHub.
This project is licensed under the MIT License. See the LICENSE file for more details.
FAQs
A vite plugin to serve PAC (Proxy Auto-Configuration) script
We found that vite-plugin-pac demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.