Rule 1 of 9 · Chapter I — Project Setup
Scaffold with pac pcf init — never by hand, never by copy-paste.
Why this rule exists
The generator wires the manifest, the TypeScript config, and the build pipeline to the versions that actually work together. Hand-rolled projects drift from the framework's expectations in ways that only surface at import time, when they are most expensive to diagnose.
In practice
Run the init command in an empty folder, one component per folder. If you need a second component, run init again in a sibling folder — do not clone a working one and rename things.
When it doesn't apply
Copying your own previous component is acceptable for prototypes you will throw away the same week.
Sources
- Microsoft Learn — Create your first component — Official PCF walkthrough the init template tracks