Come usare
- Copia il comando e controlla il pacchetto prima di installarlo nel tuo ambiente agente.
- Controlla strumenti, credenziali e ambienti richiesti nel documento originale.
- Descrivi input e risultato desiderato; confronta l’output con le fonti.
npx skills add https://github.com/sharepoint/spfx-dev-skills --skill spfxPrima di iniziare
- L’installazione non include abbonamenti, quote API o accesso ai file.
- Stelle e installazioni indicano attività, non un test indipendente di qualità o sicurezza.
Documento Skill originale
Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.
SPFx Development
Pick the reference(s) that match the user's intent. Load only what is needed and execute the steps exactly:
- Create a project → create.md
- Upgrade a project → upgrade.md
- Working on UI in a React SPFx project (components, styling, layout, accessibility) → react-design.md
- Reading or writing SharePoint / Microsoft Graph data → pnpjs.md
Global rules (apply to every SPFx task)
- Use PnPjs by default for all SharePoint and Microsoft Graph data operations. See pnpjs.md. Only fall back to raw
SPHttpClient/MSGraphClientV3when the user explicitly requires it or a dependency cannot be added. - When running `npm install`, always run it synchronously with a timeout of at least 3 minutes. SPFx projects have heavy dependency trees.
Toolchain decision rule
SPFx switched build systems at v1.22.0. Determine the version from .yo-rc.json (@microsoft/generator-sharepoint.version) or package.json, then:
| Installed SPFx version | Toolchain |
|---|---|
| v1.22.0 and newer | Heft |
| v1.0 – v1.21.1 | gulp (legacy) |
