SharePoint
SPFx Config Reference
Reference and validate SharePoint Framework (SPFx) configuration file settings.
SPFx Configuration Files — Reference Guide
SharePoint Framework (SPFx) projects include several JSON configuration files that control packaging, bundling, local development, and deployment. Understanding each file and its properties is essential for troubleshooting build failures, configuring CDN deployment, and preparing solutions for the SharePoint App Catalog.
Use the file tabs above to browse each configuration file. Search across all properties to quickly find the setting you need without consulting multiple documentation pages.
Configuration File Overview
- package-solution.json — Controls solution packaging metadata including version, feature definitions, and domain isolation. This file determines what appears in the App Catalog.
- config.json — Webpack bundle configuration. Defines entry points, external dependencies (CDN libraries that should not be bundled), and localized resource paths.
- serve.json — Local development server settings. Controls the port, HTTPS, and the initial page loaded in the workbench. Supports mocked API responses via the
apiproperty. - write-manifests.json — Specifies the CDN base path for the component manifest files. Set
cdnBasePathto your Azure Blob Storage or SharePoint CDN URL before deploying.
Common Configuration Mistakes
- Forgetting to increment
solution.versionin package-solution.json before re-packaging — the App Catalog will reject a duplicate version. - Not adding external libraries to
externalsin config.json, causing them to be bundled and inflating the package size. - Leaving
cdnBasePathas the defaultin write-manifests.json before running the deploy pipeline.