feat!: migrate from Next.js to Vite - #363
Merged
Merged
Conversation
jbottigliero
force-pushed
the
feat/vite-migration
branch
from
July 22, 2026 14:50
d57c5b2 to
f11b62e
Compare
jbottigliero
approved these changes
Jul 31, 2026
Replaces the Next.js Pages Router + static-export toolchain with a plain React + Vite build. Runtime dependencies (Mantine, Monaco, reactflow, the Globus SDK/components) are unchanged; only the build/routing/config layer is swapped. Build & tooling - Remove `next` and `eslint-config-next`; add `vite`, `@vitejs/plugin-react`. - Scripts: `dev` -> `vite`, `build` -> `tsc -b && vite build`, add `preview`, `lint` -> `eslint .` (flat config with typescript-eslint + react-hooks + react-refresh). Rule leniency mirrors the old `next/core-web-vitals`. - Split tsconfig into the standard Vite `tsconfig.app.json` / `tsconfig.node.json` project references; `jsx` -> `react-jsx`. - `next.config.mjs`, `next-env.d.ts`, `globals.d.ts`, `.eslintrc.json` removed. Routing (multi-page build, no router dependency) - Two HTML entries — `index.html` and `authenticate.html` — mirror the former static export. GitHub Pages serves `authenticate.html` at `/authenticate`, keeping the OAuth2 redirect URI working. - `src/pages/_app.tsx` -> `src/Providers.tsx` (shared providers + one-time SDK setup); `pages/index.tsx` -> `App.tsx`; `pages/authenticate.tsx` -> `AuthenticateRoute.tsx`; `pages/_document.tsx` dropped (markup now in HTML). - `FlowDefinition` moved to `src/flow.ts` (was exported from `pages/index`). - `next/router` / `next/navigation` usages replaced with `history.replaceState` / `location.assign` / `location.replace`. `next/head` metadata moved into the HTML entries. Config / env - Env vars renamed `NEXT_PUBLIC_*` -> `VITE_*`; base path is now Vite's `base` (from `VITE_BASE_PATH`), and code uses `import.meta.env.BASE_URL` for assets and the redirect URI. - SST `StaticSite` output `out` -> `dist`, env `VITE_BASE_PATH: "/"`. - GitHub Pages workflow `nextjs.yml` -> `pages.yml` (Vite build, uploads `dist`); `release-please.yml` and `dependabot.yml` updated accordingly. Verified: `npm run build`, `npm run lint`, and the dev server (both routes serve 200 under the `/flows-ide` base path) all pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jbottigliero
force-pushed
the
feat/vite-migration
branch
from
July 31, 2026 12:07
f11b62e to
6441d9c
Compare
jbottigliero
pushed a commit
that referenced
this pull request
Jul 31, 2026
🤖 I have created a release *beep* *boop* --- ## [3.0.0](flows-ide-v2.1.1...flows-ide-v3.0.0) (2026-07-31) ### ⚠ BREAKING CHANGES * migrate from Next.js to Vite ([#363](#363)) ### Features * Improved Definition Diagram Rendering ([#373](#373)) ([46fae60](46fae60)) * migrate from Next.js to Vite ([#363](#363)) ([17b4c0e](17b4c0e)) * Update to latest/stable Flows Input Schema UI renderer ([#371](#371)) ([b611b0d](b611b0d)) ### Bug Fixes * add flowId prop to Input Schema UI preview ([cc595ff](cc595ff)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
Migrates Flows IDE off Next.js onto a plain React + Vite build. This swaps only the build/routing/config layer — all runtime dependencies (Mantine, Monaco, reactflow,
@globus/*) and the app's behavior are unchanged.Why a multi-page build (no router dependency)
The app has exactly two routes:
/(the IDE) and/authenticate(the OAuth2 redirect handler). Rather than pull in a client router, this uses a Vite multi-page build with two HTML entries —index.htmlandauthenticate.html. This mirrors the former static export: GitHub Pages servesauthenticate.htmlat/authenticate, so the existing redirect URI keeps working. The only navigations in the app wererouter.replace/pushfor full-page redirects and query-param cleanup, which map directly tohistory.replaceState/location.assign/location.replace.Changes
Build & tooling
next+eslint-config-next; addedvite+@vitejs/plugin-react.dev→vite,build→tsc -b && vite build, addedpreview,lint→eslint ..typescript-eslint+react-hooks+react-refresh), with rule leniency matching the previousnext/core-web-vitalsbehavior (looseany,@ts-ignore,_-prefixed unused vars, empty catch).tsconfiginto the standard Vitetsconfig.app.json/tsconfig.node.jsonproject references;jsx→react-jsx.next.config.mjs,next-env.d.ts,globals.d.ts,.eslintrc.json.Source
pages/_app.tsx→src/Providers.tsx(shared providers + one-time SDK setup).pages/index.tsx→src/App.tsx;pages/authenticate.tsx→src/AuthenticateRoute.tsx;pages/_document.tsxdropped (its markup lives in the HTML entries). Addedsrc/main.tsx/src/authenticate.tsxentry points.FlowDefinitionmoved frompages/indextosrc/flow.ts."use client"directives (Next-only).Config / env / deploy
NEXT_PUBLIC_*→VITE_*. Base path is now Vite'sbase(fromVITE_BASE_PATH); asset URLs and the redirect URI useimport.meta.env.BASE_URL.StaticSite: outputout→dist, envVITE_BASE_PATH: "/".nextjs.yml→pages.yml(builds with Vite, uploadsdist);release-please.ymlreference anddependabot.ymlgroups updated.Verification
npm run build(tsc -b && vite build) — emitsdist/index.html+dist/authenticate.html, assets correctly prefixed with the/flows-ide/base, andpublic/(incl..nojekyll+ schemas) copied through.npm run lint— 0 errors.200under the/flows-idebase path.🤖 Generated with Claude Code