refactor: update build process and integrate vite-react-ssg for stati… - #85
Merged
Conversation
…c site generation - Changed build script in package.json to use vite-react-ssg for static site generation. - Updated main.tsx to define routes using vite-react-ssg and replaced ReactDOM rendering with ViteReactSSG. - Enhanced Landing component with SEO improvements using Head from vite-react-ssg and refactored layout for better structure.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What changed
vite-react-ssg@0.7.0(pinned exact version — Vite 6+ versions of this package are incompatible with our Vite 5 setup)buildscript tovite-react-ssg build(dev script unchanged, still plainvite)src/main.tsxto use vite-react-ssg's route-array API:/rendersLandingdirectly (server-rendered),/viewerwrapsAppin<ClientOnly>so the WebGL viewer stays 100% client-side and untouched,*keeps the existingNotFound<Head>block tosrc/pages/Landing.tsxwith a real per-page<title>, meta description, and canonical link<title>/description/canonical fromindex.html(OG/Twitter tags and JSON-LD stay, since those are shared across routes)Why
dist/index.htmlcontains the actual headline, feature list, and supported-formats text as real HTML, not just an empty<div id="root">Validation
dist/index.htmlcontains real rendered marketing copy,dist/viewer.htmlcorrectly stays client-only/empty)/viewer(not just in-app navigation) loads correctly, uploaded a test CAD file and confirmed orbit/measure still workNotes
index.htmlandviewer.html) instead of one shared shell — if the live/viewerroute doesn't load correctly after this deploys, it likely needs a small server routing rule (.htaccess) on Hostinger to map/viewertoviewer.html; flagging in case it comes up post-merge