chore: configure react-vite app using core loader - #3514
Draft
pedrobonamin wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
pedrobonamin
force-pushed
the
set-react-vite-app
branch
from
July 22, 2026 08:29
3489ba0 to
a03b083
Compare
pedrobonamin
force-pushed
the
set-react-vite-app
branch
from
July 22, 2026 08:38
73caa9b to
af50f67
Compare
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.
Description
Configures a new app in presentation using Vite and React.
This is to make it possible to work with the core loaders (
@sanity/react-loader/@sanity/core-loader) inside this repo: they receive perspective and editing variant over comlink, making the app a good test bed for content experimentation in Presentation.Next steps:
visual-editing-page-builder-viteShared package:
@repo/page-builder-sharedThe Vite app started as a copy of
apps/page-builder-demo, which meant the page-builder components (Page, sections,SimpleContent,Image), the GROQ queries and the generated types were duplicated across the two apps. Since both apps render the same dataset — and we'll likely build more preview sites with other stacks that reuse this content — the duplicated pieces now live in an internal, source-only package that both apps import:Page,PageSection,SimpleContent,Imageand the five sections.sectionFragmentand all shared queries, with the package running its ownsanity typegenso both apps get typed fetches from one generated file.PageBuilderProvider—dataAttribute(workspace-bound),Link(next/linkvsreact-router),Image(next/imagevs plain<img>), and an optionalIntroModelslot for the three.js model (Next demo only).Only the pages/routing setup remains app-specific. A future preview site on another stack just needs a provider with its own link/image adapters.
What to review
packages/@repo/page-builder-shared— package setup, provider API, typegen wiring.data-sanityattributes are built by the same helper with the same per-workspace config.Testing
tsc --noEmitpass.page-builder-demo: typegen (now only app-local queries), typecheck andnext build(all SSG routes prerender) pass.page-builder-vite: typecheck andvite buildpass; front page renders all shared sections, and Presentation previews work through thepage-builder-vitestudio workspace.