Skip to content

chore: Fix build pipeline and routing for React samples. - #1623

Open
willum070 wants to merge 2 commits into
mainfrom
update-scripts-for-react
Open

chore: Fix build pipeline and routing for React samples.#1623
willum070 wants to merge 2 commits into
mainfrom
update-scripts-for-react

Conversation

@willum070

@willum070 willum070 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Overview
This PR fixes a bug in our sample build pipeline where React/Vite samples were incorrectly being routed through the vanilla docs.sh script, causing their src/ directories to be destructively flattened and breaking DevSite macro expectations.

Key Changes:

  • samples/dist.sh:
    • Updated dist.sh to delete dist prior to copying. This ensures hashed assets don't perpetually accumulate over successive local builds.
  • samples/build-single.sh:
    • Added conditional detection for React projects (checking for src/app.tsx|jsx|js). React samples are now properly routed to react-docs.sh.
    • Added a rm -rf dist step prior to tsc execution. This ensures Vite's hashed assets don't perpetually accumulate over successive local builds.
  • samples/react-docs.sh:
    • Completely modernized to satisfy both DevSite live-render macros and snippet tab structures.
    • Preserves original source structure by safely nesting app.tsx inside docs/src/.
    • Drops the compiled app.js and style.css directly into the docs/ root exactly where DevSite expects them for live rendering.
  • Triggered React Rebuilds:
    • Added a harmless "buildRevision": 1 field to the package.json of all React (rgm-* and react-ui-kit-*) samples to cleanly force a CI rebuild and output sync without polluting the source files.

Change-Id: I75a1735bea837351371a345feceab13e42f00f81
Change-Id: I7223e4daf8ba2874ebc23470773eed94e5adcf95
@willum070
willum070 requested a review from chrisjshull August 21, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant