Skip to content

Support framework base paths outside Next.js#2771

Draft
NathanColosimo wants to merge 4 commits into
nathanc/fix-next-base-pathfrom
nathanc/fix-framework-base-path
Draft

Support framework base paths outside Next.js#2771
NathanColosimo wants to merge 4 commits into
nathanc/fix-next-base-pathfrom
nathanc/fix-framework-base-path

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Depends on #2732.

Adds non-Next base path support using framework-native config only. There is no WORKFLOW_BASE_PATH env var and no new user-facing Workflow option.

  • Adds shared base-path conversion helpers and teaches the Vercel Build Output builder to prefix public route src patterns while keeping function/static destinations internal.
  • SvelteKit reads kit.paths.base, passes it through the builder, preserves generated health method aliases after adapter processing, and lets SvelteKit mount static manifest assets under the configured base.
  • Astro reads config.base, prefixes Vercel route regexes, and guards generated handlers so the root workflow endpoints do not succeed when a base path is configured.
  • Nitro reads baseURL or Nuxt-style app.baseURL, passes it into Workflow URL generation and legacy BOA output, and keeps Nitro internal routes/function rules unprefixed because Nitro applies baseURL when serving and generating Vercel output.
  • Nuxt propagates app.baseURL into Nitro when Nitro has not already configured baseURL.
  • Workbenches can opt into base-path E2E with WORKFLOW_E2E_BASE_PATH=/app across SvelteKit, Astro, Nitro v2/v3, Nuxt, Vite, TanStack Start, Express, Fastify, and Hono.

How did you test your changes?

  • PATH=/Users/nathancolosimo/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/nathancolosimo/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:$PATH HUSKY=0 pnpm dlx pnpm@10.20.0 --filter @workflow/builders... --filter @workflow/nitro... --filter @workflow/nuxt --filter @workflow/sveltekit... --filter @workflow/astro... build
  • Focused unit tests for builders, Nitro, Astro, SvelteKit, and E2E URL helpers.
  • WORKFLOW_E2E_BASE_PATH=/app WORKFLOW_PUBLIC_MANIFEST=1 ... build for SvelteKit, Astro, Nitro v2, Nitro v3, Nuxt, Vite, and TanStack Start workbenches.
  • Local HTTP probes against built Nitro v3, SvelteKit, and Astro apps verified base-prefixed health endpoints, root endpoint behavior, and public manifest serving.
  • Focused local Nitro v3 E2E covered base path health, workflow start, and webhook resume paths.
  • biome check over touched files passed with warnings only.
  • pnpm dlx pnpm@10.20.0 changeset status --since=origin/nathanc/fix-next-base-path passed.

Ad-hoc Vercel preview deployment was not run from this machine because the Vercel CLI and required auth/OIDC environment variables were not available. The PR is draft so CI and preview deployments can validate the Vercel side.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 DCO sign-off passes (run git commit --signoff on your commits)
  • 📝 Ping @vercel/workflow in a comment once the PR is ready, and the above checklist is complete

Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 64d223e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/builders Patch
@workflow/astro Patch
@workflow/nitro Patch
@workflow/nuxt Patch
@workflow/sveltekit Patch
workflow Patch
@workflow/cli Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/rollup Patch
@workflow/vite Patch
@workflow/vitest Patch
@workflow/world-testing Patch
@workflow/core Patch
@workflow/web-shared Patch
@workflow/web Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jul 4, 2026 2:12am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jul 4, 2026 2:12am
example-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-astro-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-express-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-fastify-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-hono-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-nitro-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-nuxt-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-sveltekit-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workbench-vite-workflow Ready Ready Preview, Comment Jul 4, 2026 2:12am
workflow-docs Ready Ready Preview, Comment, Open in v0 Jul 4, 2026 2:12am
workflow-swc-playground Ready Ready Preview, Comment Jul 4, 2026 2:12am
workflow-tarballs Ready Ready Preview, Comment Jul 4, 2026 2:12am
workflow-web Ready Ready Preview, Comment Jul 4, 2026 2:12am

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1442 0 241 1683
✅ 💻 Local Development 1605 0 231 1836
✅ 📦 Local Production 1605 0 231 1836
✅ 🐘 Local Postgres 1593 0 243 1836
✅ 🪟 Windows 152 0 1 153
✅ 📋 Other 885 0 186 1071
Total 7282 0 1133 8415

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 125 0 28
✅ example 125 0 28
✅ express 125 0 28
✅ fastify 125 0 28
✅ hono 125 0 28
✅ nextjs-turbopack 149 0 4
✅ nextjs-webpack 149 0 4
✅ nitro 125 0 28
✅ nuxt 125 0 28
✅ sveltekit 144 0 9
✅ vite 125 0 28
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 127 0 26
✅ express-stable 127 0 26
✅ fastify-stable 127 0 26
✅ hono-stable 127 0 26
✅ nextjs-turbopack-canary 133 0 20
✅ nextjs-turbopack-stable 152 0 1
✅ nextjs-webpack-canary 133 0 20
✅ nextjs-webpack-stable 152 0 1
✅ nitro-stable 127 0 26
✅ nuxt-stable 127 0 26
✅ sveltekit-stable 146 0 7
✅ vite-stable 127 0 26
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 127 0 26
✅ express-stable 127 0 26
✅ fastify-stable 127 0 26
✅ hono-stable 127 0 26
✅ nextjs-turbopack-canary 133 0 20
✅ nextjs-turbopack-stable 152 0 1
✅ nextjs-webpack-canary 133 0 20
✅ nextjs-webpack-stable 152 0 1
✅ nitro-stable 127 0 26
✅ nuxt-stable 127 0 26
✅ sveltekit-stable 146 0 7
✅ vite-stable 127 0 26
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 126 0 27
✅ express-stable 126 0 27
✅ fastify-stable 126 0 27
✅ hono-stable 126 0 27
✅ nextjs-turbopack-canary 132 0 21
✅ nextjs-turbopack-stable 151 0 2
✅ nextjs-webpack-canary 132 0 21
✅ nextjs-webpack-stable 151 0 2
✅ nitro-stable 126 0 27
✅ nuxt-stable 126 0 27
✅ sveltekit-stable 145 0 8
✅ vite-stable 126 0 27
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 152 0 1
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 127 0 26
✅ e2e-local-dev-tanstack-start- 127 0 26
✅ e2e-local-postgres-nest-stable 126 0 27
✅ e2e-local-postgres-tanstack-start- 126 0 27
✅ e2e-local-prod-nest-stable 127 0 26
✅ e2e-local-prod-tanstack-start- 127 0 26
✅ e2e-vercel-prod-tanstack-start 125 0 28

📋 View full workflow run

Comment thread packages/astro/src/builder.ts
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
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