New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

vite-proxy-server

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-proxy-server

vite plugin of start local proxy server

latest
npmnpm
Version
1.0.5
Version published
Maintainers
0
Created
Source

说明

一个 vite 插件,在 vite 启动时,监听本地指定端口(默认 3000)的 http 请求,并将此端口的所有请求都转发到指定的 URL。

使用方式

1. 安装

npm install vite-proxy-server --save-dev

2. 使用

在 vite.config.ts 文件中:

import viteServerPlugin from "vite-proxy-server";
export default defineConfig({
	plugins: [
		viteServerPlugin({
			port: 3000, // 可选,配置服务器端口号,默认为 3000
			targetUrl: "http://example.com", // 转发的目标地址
		}),
	],
});

Keywords

vite

FAQs

Package last updated on 12 Jul 2024

Did you know?

Socket

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.

Install

Related posts