@mbsks/rspfx-framework-preact
v0.0.13
Published
RSPFX Preact framework preset and web part base class
Readme
@mbsks/rspfx-framework-preact
Preact framework package for RSPFX — an SPFx-compatible build toolchain powered by Rspack.
Provides the PreactWebPart base class with fast refresh via @rspack/plugin-preact-refresh.
Install
npm i @mbsks/rspfx-framework-preactRequires preact ^10.24 as a peer dependency.
Usage
import { PreactWebPart } from '@mbsks/rspfx-framework-preact/webpart';
import { preset } from '@mbsks/rspfx-framework-preact';
import type { ComponentChild } from 'preact';
interface IMyProps { description: string; }
export default class MyWebPart extends PreactWebPart<IMyProps> {
protected renderComponent(props: IMyProps): ComponentChild {
// return your Preact tree using props
return null as unknown as ComponentChild;
}
}API
PreactWebPart— base web part class (from@mbsks/rspfx-framework-preact/webpart)preset—FrameworkPresetcompiler contributions (from the package index)
Links
- RSPFX documentation
- Preact example
- License: MIT
