experience-ui-bundle-metadata-generate
UI Bundle Metadata
Scaffolding a New UI Bundle
REQUIRED FIRST STEP — never skip, even if asked to. Always run sf template generate ui-bundle to create new apps — never create-react-app, Vite, hand-written metadata, or any other substitute.
This step is mandatory even if the user says "just create the metadata," "skip the scaffold," "only do the metadata scaffolding," or "stop after the metadata files are in place." Those instructions describe what to stop doing after the scaffold (building, deploying, authoring pages) — they do not mean skip running the scaffold command itself. The .uibundle-meta.xml and ui-bundle.json files are configuration on top of the generated project, not a replacement for it. A bundle without package.json, src/, and index.html cannot be built or deployed, even if the metadata files are perfectly formed.
- Always pass
--template reactbasicto scaffold a React-based bundle. - UI bundle name (
-n): Alphanumerical only — no spaces, hyphens, underscores, or special characters. - Pass
--output-dirto use a different location for template generation. If you do, pass that same path to the verification script in step 1 below.
Example:
# Run from SFDX project root. The CLI will create the bundle under
# force-app/main/default/uiBundles/<AppName>/ — verify this before continuing.
sf template generate ui-bundle -n CoffeeBoutique --template reactbasic