Skip to content

chore: configure react-vite app using core loader - #3514

Draft
pedrobonamin wants to merge 2 commits into
mainfrom
set-react-vite-app
Draft

chore: configure react-vite app using core loader#3514
pedrobonamin wants to merge 2 commits into
mainfrom
set-react-vite-app

Conversation

@pedrobonamin

@pedrobonamin pedrobonamin commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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:

  • Configure vercel to deploy visual-editing-page-builder-vite

Shared package: @repo/page-builder-shared

The 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:

  • Components: Page, PageSection, SimpleContent, Image and the five sections.
  • Queries + types: sectionFragment and all shared queries, with the package running its own sanity typegen so both apps get typed fetches from one generated file.
  • Framework injection: the only things that actually differed between the apps are provided through PageBuilderProviderdataAttribute (workspace-bound), Link (next/link vs react-router), Image (next/image vs plain <img>), and an optional IntroModel slot 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.
  • Both apps: pages/routes now import components and queries from the package; Tailwind configs scan the package source.
  • Overlays should behave exactly as before: data-sanity attributes are built by the same helper with the same per-workspace config.

Testing

  • Shared package: lint + tsc --noEmit pass.
  • page-builder-demo: typegen (now only app-local queries), typecheck and next build (all SSG routes prerender) pass.
  • page-builder-vite: typecheck and vite build pass; front page renders all shared sections, and Presentation previews work through the page-builder-vite studio workspace.

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
live-visual-editing-next Ready Ready Preview, Comment Jul 22, 2026 8:41am
visual-editing-next Ready Ready Preview, Comment Jul 22, 2026 8:41am
visual-editing-page-builder-demo Ready Ready Preview, Comment Jul 22, 2026 8:41am
visual-editing-page-builder-vite Ready Ready Preview, Comment Jul 22, 2026 8:41am
visual-editing-storybook Ready Ready Preview, Comment Jul 22, 2026 8:41am
visual-editing-studio Ready Ready Preview, Comment Jul 22, 2026 8:41am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
visual-editing-astro Ignored Ignored Jul 22, 2026 8:41am
visual-editing-next-with-i18n Ignored Ignored Jul 22, 2026 8:41am
visual-editing-nuxt Ignored Ignored Jul 22, 2026 8:41am
visual-editing-remix Ignored Ignored Jul 22, 2026 8:41am
visual-editing-svelte Ignored Ignored Jul 22, 2026 8:41am

Request Review

@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: af50f67

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security

socket-security Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​tailwindcss/​vite@​4.3.31001008998100
Addednpm/​@​vitejs/​plugin-react@​5.2.010010010092100

View full report

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