-
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(nitro): fix rendering with ssr
disabled
#2191
Conversation
If NUXT_NO_SSR is true, server.mjs is never loaded, but Rollup gets confused because it thinks server.mjs might be imported. To fix this, we add a condition so that Rollup can infer that server.mjs is never loaded.
βοΈ Deploy Preview for nuxt3-docs canceled. π¨ Explore the source changes: 2decee1 π Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/61a3233fba310a000826644d |
I also have the same problem :( |
+1 |
Sorry for delay reponse. We need to fix spa support but this PR is not a valid fix with introducing |
No worries! I didn't introduce framework/packages/nitro/src/rollup/config.ts Line 160 in 6a25d3e
When I follow the functions back, it seems like ( I may have misunderstood the code, though. Are there situations where |
Merging it should be a hell of a priority I'd say |
ssr
disabled
If it's in version 3.0.0-27313139.1c88580, then it's not fixed yet.
|
Have it been fixed?
|
some issues |
π Linked issue
fix nuxt/bridge#27
β Type of change
π Description
When using
ssr: false
,server.mjs
doesn't exist, but Rollup gets confused because it thinksserver.mjs
might be imported. To fix this, I added a condition so that Rollup knows thatserver.mjs
will never be loaded ifNUXT_NO_SSR
istrue
.I also added code to handle the new Vite manifest format in
getSPARenderer
.To test my changes, I added
ssr: false
toplayground/nuxt.config.ts
. Then, I rannpx yarn run nuxi build playground && node playground/.output/server/index.mjs
.π Checklist