@mbsks/rspfx-sppkg-builder
v0.0.13
Published
RSPFX .sppkg package assembly (AppManifest, features, assets)
Downloads
1,270
Readme
@mbsks/rspfx-sppkg-builder
Package builder for RSPFX — an SPFx-compatible build toolchain powered by Rspack.
Assembles the deployable SharePoint package: sharepoint/solution/<name>.sppkg — a ZIP containing the app manifest, features, and assets, exactly matching official SPFx output.
Install
npm i @mbsks/rspfx-sppkg-builderUsage
import { buildPackage, validateSppkg } from '@mbsks/rspfx-sppkg-builder';
import type { BuildPackageResult } from '@mbsks/rspfx-sppkg-builder';
const result: BuildPackageResult = await buildPackage({
projectRoot: process.cwd(),
solutionConfigPath: 'config/package-solution.json',
manifestsDir: 'temp/manifests',
assetsDir: 'dist',
production: true,
});
// result.outputPath -> sharepoint/solution/my-solution.sppkg
const { ok, errors } = await validateSppkg(result.outputPath); // zip integrityAPI
buildPackage(opts)— assemble the.sppkgpackage (opts: BuildPackageOptions { projectRoot, manifestsDir, solutionConfigPath, assetsDir, production, outDir?, prettyXml?, teamsDir?, resxDir? })validateSppkg(path)— zip integrity + expected entry validation (Promise<SppkgValidationResult>)BuildPackageResult— result type ({ outputPath, zipEntries, appManifest })
Links
- RSPFX documentation
- Format ground truth
- License: MIT
