-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSR load executed twice: once on server, once on client after build #1383
Comments
@leblancmeneses any additional findings here? |
@brandonroberts, I haven't looked yet. The earliest I can look at this is after December ~3rd. Could you give me till the 6th to get back to you? |
@brandonroberts I looked at the project today because I started another analogjs project 🎉🎉🎉. Here is a demo setup of the problem. It does look like the project regressed because on #1396 it used to work for prod build without basehref, however, now it does not. I added some log statements in the area #1396 edited and noticed that on client It might be a good time to start those YouTube videos : ]. |
I took a look at the demo setup and it works correctly if you omit the pnpm run build --baseHref='/basehref/'
NITRO_APP_BASE_URL="/basehref/" node dist/analog/server/index.mjs And include the Navigate to |
@brandonroberts Thank you for looking into this! Unfortunately, the current provided solution doesn't address the issue in this case. Using the documented approach for setting the baseHref and not prerendering '/' results in two API requests being made, which is not the desired behavior. The intent of the repo was to showcase the issue for SSR when prerender is not an option e.g. homepage showing fresh data. |
Please provide the environment you discovered this bug in.
node: 20.11.1, Apple M1 Max, analogjs 1.8.2
Which area/package is the issue in?
vite-plugin-nitro
Description
Project Setup
scaffold with option: "Full-stack Application"
index.page.ts
index.server.ts
Please provide the exception or error you saw
The text was updated successfully, but these errors were encountered: