@mbsks/rspfx-core
v0.0.13
Published
Zero-dependency core for RSPFX: SPFx types, base web part, config, environment
Readme
@mbsks/rspfx-core
Zero-dependency core of RSPFX — an SPFx-compatible build toolchain powered by Rspack.
Contains the shared foundation used by every RSPFX package: SPFx types, the base web part, project config, and environment helpers. It has no dependencies — no framework, no bundler, no Node APIs — and runs anywhere.
Install
npm i @mbsks/rspfx-core
# or: pnpm add @mbsks/rspfx-coreRequires the @microsoft/sp-core-library and @microsoft/sp-webpart-base peer packages.
Usage
import { defineConfig, resolveConfig } from '@mbsks/rspfx-core';
import { EnvironmentType } from '@mbsks/rspfx-core';
import { Version } from '@mbsks/rspfx-core';
const config = resolveConfig(
defineConfig({ framework: 'react', spfxVersion: '1.22' })
);API
defineConfig(config)/resolveConfig(config)— typed project config with defaultsRspfxConfig,BuildConfig,DevConfig,DeployConfig,PlaygroundConfig— config typesFrameworkId,SpfxTarget— framework and SPFx target unionsEnvironmentType,PropertyPaneFieldType— SPFx-compatible enumsVersion— SPFx-style version parsing/comparison- Base web part (
BaseWebPartwithrenderInto/disposeFrom/getComponentPropshooks) — extend to build your own web parts
Links
- RSPFX documentation
- Internal API contract
- License: MIT
