diff --git a/packages/vite-plugin/README.md b/packages/vite-plugin/README.md index 6c691b7e..60568f7d 100644 --- a/packages/vite-plugin/README.md +++ b/packages/vite-plugin/README.md @@ -39,6 +39,24 @@ The plugin accepts the following options: - `redirects`: Configure URL redirects - `staticFiles`: Configure static file serving +### 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. + +- `build.enabled` (boolean, default: `false`): Prepare the server build for deployment to Netlify +- `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..8af4100f 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 experimental and only tested on some versions of some frameworks; see below. */ 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 /**