Vite plugin for TanStack Start on Netlify
npm install @netlify/vite-plugin-tanstack-startThis Vite plugin configures your TanStack Start app for deployment to Netlify and provides full local emulation of
the Netlify platform directly in vite dev.
- Configures vite build to prepare your app's production build for deployment to Netlify
- See
full TanStack Start deployment docs for more
- Configures vite dev to behave just like the production Netlify platform, but locally on your machine
- This has all the same features as @netlify/vite-plugin.
Check out its docs for details.
``bash`
npm install -D @netlify/vite-plugin-tanstack-start
The plugin accepts the following options:
`typescript`
{
dev: {
edgeFunctions: {
enabled: false,
},
// ... All dev options are supported here.
// See https://www.npmjs.com/package/@netlify/vite-plugin.
},
}
Add the plugin to your vite.config.js or vite.config.ts:
`js
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import react from '@vitejs/plugin-react'
import netlify from '@netlify/vite-plugin-tanstack-start'
export default defineConfig({
plugins: [tanstackStart(), react(), netlify()],
})
``