-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Replace $ vite build && vite build --ssr with $ vite build + enable plugins to add build step #5936
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
enhancementNew feature or requestNew feature or requestp3-significantHigh priority enhancement (priority)High priority enhancement (priority)
Description
Clear and concise description of the problem
We want to build deploy plugins, e.g. vite-plugin-cloudflare-workers, vite-plugin-vercel, and vite-plugin-deno-deploy.
Currently, the user would need to:
// package.json
{
"scripts": {
"build": "vite build && vite build --ssr && vite-plugin-cloudflare-workers build"
}
}Suggested solution
// package.json
{
"scripts": {
// Automatically runs all three build steps:
// 1. client bundling
// 2. SSR bundling
// 3. custom build step (defined by the plugin)
"build": "vite build",
}
}// vite.config.js
import cloudflareWorkers from 'vite-plugin-cloudflare-workers'
export default {
plugins: [ cloudflareWorkers() ],
server: './path/to/server.js'
}Additional context
There is an increasingly number of deploy environments.
- Deno Edge (which supports Vite apps)
- Supabase Functions
- AWS Lamda
- AWS EC2
- Cloudflare Workers
- Netlify Functions
- Vercel
- ...
This ticket enables deploy plugins which in turn enables deeper collaboration between SSR frameworks.
Eventually it is the deploy providers who will maintain these plugins. (Like how Cloudflare Workers took over miniflare.)
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestp3-significantHigh priority enhancement (priority)High priority enhancement (priority)
Type
Projects
Status
Discussing