Running `vite build` doesn't create a .output folder anymore in RC
I've been able to migrate my project to RC and everything's running fine but when I tried building it, a .output folder wasn't created, but in the docs the output folder is still used. Any tips about how I can build and start my app?
Here's my vite config
18 Replies
underlying-yellow•3mo ago
If you don’t need Nitro, you can use srvx to serve your project.
You can use the Nitro v2 plugin the same way as before the RC version , create an .output folder.
"start": "pnpx srvx --prod -s ../client dist/server/server.js"wise-whiteOP•3mo ago
This worked! Thank you so much!
conscious-sapphire•3mo ago
Nice, I didn't know about srvx. The docs have not been updated to the release.
extended-salmon•3mo ago
This is helping me with the same problem, but I can't get the client directory right. I've got
pnpx srvx --prod -s dist/client dist/server/server.js, and I get the below output:
The server is accessible, but none of the static files are available. I've tried manually moving the contents of dist/client to dist/client/public and that still doesn't work. If I'm reading the srvx docs right, the -s dist/client should be configuring it to consider that the as public directory? But the message on Static files makes it seems like it's not finding anything configured.
Never mind--should have taken the command verbatim. The client path is relative to the server file.rising-crimson•3mo ago
are you able to get the static assets to work it returns a 404 for me path is correct

extended-salmon•3mo ago
Is the trailing
/ in the static files affecting anything?rising-crimson•3mo ago
dont think so the command i use is:
"preview": "dotenv -- srvx --prod -s ../client dist/server/server.js",
it just seems to not run the middleware as i see my not found component being rendered
xenogeneic-maroon•2mo ago
how did u fix it i got the same problem?
extended-salmon•2mo ago
The -s path was relative to the server.js file, not the directory the command is run in
xenogeneic-maroon•2mo ago
"start1": "pnpx srvx --prod -s ../client/assets dist/server/server.js",
"start2": "pnpx srvx --prod -s ./client dist/server/server.js",
"start3": "pnpx srvx --prod -s ./dist/client dist/server/server.js" all of those didn't work even the style is missing could send me the script
conscious-sapphire•2mo ago
xenogeneic-maroon•2mo ago
thank u but still it doesn't work
conscious-sapphire•2mo ago
does not work how?
we use this for all our e2e tests
xenogeneic-maroon•2mo ago
i' using tanstack start with solidJS
conscious-sapphire•2mo ago
and?
xenogeneic-maroon•2mo ago
and still no luck
conscious-sapphire•2mo ago
well then please create a complete reproducer project
xenogeneic-maroon•2mo ago
Okay, I'll thank u