building for production with a custom server #560
-
I am trying to build a production build with VPS and express. The boilerplate provides an example that differs from vite's build for production guide. The latter does not work. ContextThe boilerplate uses ProblemBuilding for production as provided in vite's documentation does not work. Vite recommends two build scripts, one for the client and one for the server. {
"scripts": {
"dev": "node server",
"build:client": "vite build --outDir dist/client",
"build:server": "vite build --outDir dist/server --ssr src/entry-server.js"
}
} Defining the build:server script fails with VPS and
The same problem applies to
Questions
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You may want to give https://github.com/cyco130/vavite a try. Also: https://github.com/hattipjs/hattip/tree/main/examples/vavite/vite-plugin-ssr. HatTip is a more edgy, but really cool :-). |
Beta Was this translation helpful? Give feedback.
You may want to give https://github.com/cyco130/vavite a try.
Also: https://github.com/hattipjs/hattip/tree/main/examples/vavite/vite-plugin-ssr. HatTip is a more edgy, but really cool :-).
FYI https://vite-plugin-ssr.com/disableAutoFullBuild.