From a1bc6f11b9391c17ed3f96173ab99b9fd92f9419 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 15:39:11 +0000 Subject: [PATCH 1/5] docs(vite-plugin): mark build options experimental instead of private The `build` options were annotated `@private` with "DO NOT USE", but they are what SolidStart 2 and TanStack Start projects use to deploy without a framework-specific adapter. Mark them `@experimental` and document them in the README so the annotation matches how they're used. The build implementation isn't TanStack-specific, so update the supported-frameworks note to include SolidStart 2. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01LSiikE36SgrpS184fepX7Q --- packages/vite-plugin/README.md | 22 ++++++++++++++++++++++ packages/vite-plugin/src/main.ts | 7 ++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/vite-plugin/README.md b/packages/vite-plugin/README.md index 6c691b7e..6c8db7f7 100644 --- a/packages/vite-plugin/README.md +++ b/packages/vite-plugin/README.md @@ -39,6 +39,28 @@ The plugin accepts the following options: - `redirects`: Configure URL redirects - `staticFiles`: Configure static file serving +### Build options + +> These options are **experimental** and may change in a minor release. + +The `build` options prepare your app's server build for deployment to Netlify, so you don't need a framework-specific +adapter or plugin. They're currently supported for TanStack Start and SolidStart 2 projects. + +- `build.enabled` (boolean, default: `false`): Prepare the server build for deployment to Netlify +- `build.edgeSSR` (boolean, default: `false`): Deploy the SSR handler to Netlify Edge Functions instead of Netlify + Functions +- `build.displayName` (string, default: `@netlify/vite-plugin server handler`): A display name for the serverless + function or edge function deployed to Netlify + +```js +import { defineConfig } from 'vite' +import netlify from '@netlify/vite-plugin' + +export default defineConfig({ + plugins: [netlify({ build: { enabled: true } })], +}) +``` + ## Usage Add the plugin to your `vite.config.js` or `vite.config.ts`: diff --git a/packages/vite-plugin/src/main.ts b/packages/vite-plugin/src/main.ts index 89381c0d..b01c2f5d 100644 --- a/packages/vite-plugin/src/main.ts +++ b/packages/vite-plugin/src/main.ts @@ -16,15 +16,16 @@ export interface NetlifyPluginOptions extends Features { middleware?: boolean /** - * DO NOT USE - build options, not meant for public use at this time. - * @private + * Options for building your app for deployment to Netlify. + * + * @experimental These options are not yet stable and may change in a minor release. */ build?: { /** * Prepare the server build for deployment to Netlify - no additional configuration, * plugins, or adapters necessary (default: false). * - * This is currently only supported for TanStack Start projects. + * This is currently supported for TanStack Start and SolidStart 2 projects. */ enabled?: boolean /** From 702521f7eb7b0f0d6ebede4a841bb3401b2207fd Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Wed, 5 Aug 2026 11:42:45 -0400 Subject: [PATCH 2/5] Apply suggestion from @serhalp --- packages/vite-plugin/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite-plugin/src/main.ts b/packages/vite-plugin/src/main.ts index b01c2f5d..8af4100f 100644 --- a/packages/vite-plugin/src/main.ts +++ b/packages/vite-plugin/src/main.ts @@ -18,7 +18,7 @@ export interface NetlifyPluginOptions extends Features { /** * Options for building your app for deployment to Netlify. * - * @experimental These options are not yet stable and may change in a minor release. + * @experimental These options are experimental and only tested on some versions of some frameworks; see below. */ build?: { /** From d3d8664b8e55ad77e0e61f07841d6fc9b1253cd3 Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Wed, 5 Aug 2026 11:43:42 -0400 Subject: [PATCH 3/5] Apply suggestion from @serhalp --- packages/vite-plugin/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/vite-plugin/README.md b/packages/vite-plugin/README.md index 6c8db7f7..c58ad260 100644 --- a/packages/vite-plugin/README.md +++ b/packages/vite-plugin/README.md @@ -39,9 +39,7 @@ The plugin accepts the following options: - `redirects`: Configure URL redirects - `staticFiles`: Configure static file serving -### Build options - -> These options are **experimental** and may change in a minor release. +### EXPERIMENTAL: Building your app for deployment The `build` options prepare your app's server build for deployment to Netlify, so you don't need a framework-specific adapter or plugin. They're currently supported for TanStack Start and SolidStart 2 projects. From fa6d919de66483fdf5e026e2c07c6bbbc42e8630 Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Wed, 5 Aug 2026 11:44:44 -0400 Subject: [PATCH 4/5] Apply suggestion from @serhalp --- packages/vite-plugin/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/vite-plugin/README.md b/packages/vite-plugin/README.md index c58ad260..d77182d2 100644 --- a/packages/vite-plugin/README.md +++ b/packages/vite-plugin/README.md @@ -45,7 +45,6 @@ The `build` options prepare your app's server build for deployment to Netlify, s adapter or plugin. They're currently supported for TanStack Start and SolidStart 2 projects. - `build.enabled` (boolean, default: `false`): Prepare the server build for deployment to Netlify -- `build.edgeSSR` (boolean, default: `false`): Deploy the SSR handler to Netlify Edge Functions instead of Netlify Functions - `build.displayName` (string, default: `@netlify/vite-plugin server handler`): A display name for the serverless function or edge function deployed to Netlify From 195dafad65ce30727b11ca5dbc81573e7e5899ab Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 15:51:53 +0000 Subject: [PATCH 5/5] docs(vite-plugin): drop orphaned line left by edgeSSR removal The suggestion that removed the `build.edgeSSR` bullet replaced only the first of its two wrapped lines, leaving `Functions` dangling as a continuation of the `build.enabled` bullet. This failed `prettier --check`, which wanted to fold it into the line above. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01LSiikE36SgrpS184fepX7Q --- packages/vite-plugin/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/vite-plugin/README.md b/packages/vite-plugin/README.md index d77182d2..60568f7d 100644 --- a/packages/vite-plugin/README.md +++ b/packages/vite-plugin/README.md @@ -45,7 +45,6 @@ The `build` options prepare your app's server build for deployment to Netlify, s adapter or plugin. They're currently supported for TanStack Start and SolidStart 2 projects. - `build.enabled` (boolean, default: `false`): Prepare the server build for deployment to Netlify - Functions - `build.displayName` (string, default: `@netlify/vite-plugin server handler`): A display name for the serverless function or edge function deployed to Netlify