Back to results
rquanx/rollup-plugin-sp-rest-proxy(opens in a new tab)
Language: TypeScript
- stars
- 4
- watchers
- 1
- forks
- 0
- open issues
- 1
- Last updated
- 04/27/2026
Language: TypeScript
Rollup / Vite plugin that wires sp-rest-proxy into the dev server so SharePoint REST calls resolve locally while you build.
rollup-plugin-sp-rest-proxy@^2 for Vite 5–7 projects.rollup-plugin-sp-rest-proxy@^1, which keeps the old default export.npm install -D rollup-plugin-sp-rest-proxy
# or
pnpm add -D rollup-plugin-sp-rest-proxyimport { defineConfig } from "vite"; import { RollupPluginSPRestProxy } from "rollup-plugin-sp-rest-proxy"; const rollupPluginSPRestProxy = new RollupPluginSPRestProxy(); export default defineConfig({ server: { proxy: { ...rollupPluginSPRestProxy.viteProxySetting(), }, }, plugins: [rollupPluginSPRestProxy.rollupPlugin()], });
import { defineConfig } from "vite"; import { RollupPluginSPRestProxy } from "rollup-plugin-sp-rest-proxy"; export default defineConfig( RollupPluginSPRestProxy.mergeViteConfig({ /* your vite config */ }) );
sp-rest-proxy settings; defaults are
{ port: 9090, hostname: "localhost" }.viteProxySetting merges the SharePoint _api proxy into any existing Vite
proxy map while preserving your other entries.sp-rest-proxy@^3.3.6, portfinder@^1.0.28, and
Vite 7.x to stay current with upstream fixes.