Skip to content

Why RSPFx

RSPFx is a drop-in replacement for the official SPFx toolchain (gulp + Heft + webpack). It builds the same SharePoint Framework solutions — same manifests, same AMD bundles, same .sppkg — with Vite (default), Rsbuild, or Rspack. See Microsoft docs: SharePoint Framework overview and SharePoint Framework toolchain.

You keep config/config.json, config/package-solution.json, and src/*/*.manifest.json. RSPFx reads them and runs the bundler for you. No Heft rig, no gulpfile, no webpack config.

Tip: Start zero-config — rspfx build and rspfx dev synthesize config from your manifests. Add a bundler file only when you need custom loaders or CSS. See getting-started.md.

Zero config for standard layouts

Official SPFx needs gulpfile.js, Heft tsconfig.json extends, config/config.json, config/serve.json, config/write-manifests.json, config/package-solution.json, and .yo-rc.json.

RSPFx needs none of them. Existing manifests work as-is.

When you want control, one plugin is enough:

ts
// vite.config.ts — optional
import { rspfxVite } from '@mbsks/rspfx-plugin';
export default { plugins: [rspfxVite({ name: 'my-app', version: '1.0.0', spfxVersion: '1.22', framework: 'react' })] };

See migrating-from-gulp-heft.md#same-manifest-for-heftgulp-and-rspfx.

Tip: Most web parts don't need @microsoft/sp-* installed — RSPFx externalizes them. Install only if you import that runtime (e.g. @microsoft/sp-http).

Any modern bundler — not just webpack

BundlerConfigBuild + dev
Vite (default)vite.config.ts + rspfxVite
Rsbuildrsbuild.config.ts + rspfxRsbuild
Rspackrspack.config.ts + RspfxPlugin
Turbopack❌ no bundler plugin API; see roadmap.md

Official toolchain is webpack 5 only.

Tip: Pick Vite unless you need Rspack features — fastest loop, simplest CSS. Rank: Vite > Rsbuild > Rspack. See styling.md.

Every UI framework — not just React

FrameworkOfficial SPFxRSPFx
React / Vanilla TS
Solid / Preact / Vue / Svelte✅ built-in (@mbsks/rspfx-framework-*)
Other frameworks❌ manual setup✅ one-file FrameworkPreset (packages/plugin-api/src/types.ts:29) + BaseWebPart (packages/core/src/base-web-part.ts:10) via definePlugin/registerPlugin (packages/plugin-api/src/registry.ts:5) — see custom-framework.md

Built-ins are @mbsks/rspfx-framework-*. Any other framework works with one file — FrameworkPreset + BaseWebPart, registerPlugin(definePlugin({ frameworkPreset })) in vite.config.ts/rsbuild.config.ts/rspack.config.ts, framework: 'my-framework' as const; no CLI fork. See frameworks.md and custom-framework.md.

Switch SPFx versions in one line

Official: update generator, Heft, rigs, sp-build-web, every sp-* pin, and heft.json extends.

RSPFx: change spfxVersion: '1.24' in your bundler config and run bun update @mbsks/rspfx-* (or pnpm update / npm update / yarn upgrade). See upgrading-spfx-version.md and compatibility.md#spfx-version-matrix.

Faster and modern

  • 5–10× faster than webpack 5 (Vite/Rsbuild/Rspack + SWC, Rspack caches to disk).
  • No task runner — rspfx calls the bundler directly (no gulp → Heft → webpack).
  • Save → rebuild → auto-reload; rspfx dev --refresh preserves state where supported. See fast-refresh.md.
  • ESM-only, Node ≥ 20, no gulpfile/Heft; rspfx doctor and rspfx migrate replace cryptic stack traces and manual migration. See commands.md.

Still 100% SPFx-compatible

  • Byte-compatible AMD bundles (define('<id>_<version>', …)).
  • Same config/config.json contracts — shared between Heft/Gulp and RSPFx.
  • Debug manifests at /temp/manifests.js for the workbench; .sppkg validated against the app catalog layout. See deployment.md and Microsoft docs: Extensions overview and Library component overview.

Feature comparison

CapabilityOfficial toolchainRSPFx
Workbench dev server (:4321)gulp serverspfx dev (zero-config)
Web part + app manifestsHeft pluginAuto-generated
Localized resourcesHeftBuilt-in (per-locale bundles)
.sppkg packaginggulp bundle + gulp package-solutionrspfx package
App catalog deployManual / CI scriptsrspfx deploy or manual
Fast refreshrspfx dev --refresh (react/preact/vue/svelte/solid)
Bundle analysisManual webpack-bundle-analyzerrspfx analyze
Scaffoldingyo @microsoft/sharepointnpm create vite@latest (or pnpm/yarn/bun/deno) + rspfxVite() (or rspfx new shortcut); also better-t-stack, TanStack Router, Rsbuild/Rspack starters
Migrate existing projectManual editsrspfx migrate --dry-runrspfx migrate (or BYOS plugin for greenfield)
Switch SPFx versionUpdate generator + rig + Heft + every sp-*Change spfxVersion + bun update / pnpm update

Released under the MIT License.