Rebuild demo on Vite with React 19#487
Merged
Merged
Conversation
- Replace unmaintained Parcel 1.12.3 with Vite 7 (@vitejs/plugin-react) - React 18 -> 19, react-router-dom 6 -> 7, styled-components 5 -> 6, TypeScript 3.4 -> 6, @types/react 16 -> 19 - Drop react-app-polyfill, react-is, and Parcel aliases; use Vite resolve.dedupe for react/react-dom/styled-components instead - Modern tsconfig (bundler resolution, react-jsx, strict) with tsc typecheck in the build script - Add _redirects for Netlify SPA fallback so /dashboard deep links work - Build output stays at demo/dist, so the root netlify-build script and Netlify publish directory are unchanged Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Netlify site's UI settings date from the Parcel 1 era and pin an old Node version; Vite 7 needs Node 20.19+/22.12+. Declare the build command, publish dir, and Node version in the repo instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The root .nvmrc pinned Node 16, which Vite 7 cannot run on; the deploy preview failed there while local builds used a modern Node. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #487 +/- ##
=======================================
Coverage 95.71% 95.71%
=======================================
Files 2 2
Lines 70 70
Branches 19 19
=======================================
Hits 67 67
Misses 1 1
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The demo is the public Netlify showcase, but it was the oldest code in the repo: Parcel 1.12.3 (unmaintained since 2019), TypeScript 3.4,
@types/react16, and styled-components 5, held together by Parcel aliases into the rootnode_modules.What changed
aliashack replaced with Viteresolve.dedupeso the demo and the library source share one React copydemo/dist, so the rootnetlify-buildscript is unchanged; addeddemo/public/_redirectsfor SPA route fallbackVerification
npm run netlify-buildproduces a working production buildonLoad/onDesignLoad/onReadyall fire (verified against the modernized 2.0.0 library build)🤖 Generated with Claude Code