fix(nuxt): don't inline styles for per-request ssr: false#8106
fix(nuxt): don't inline styles for per-request ssr: false#8106
ssr: false#8106Conversation
|
|
✅ Deploy Preview for nuxt3-docs canceled.
|
|
Ideally we would still render global inline styles with framework/packages/nuxt/src/core/templates.ts Lines 243 to 244 in c404cb1 We could either set this manually in Thoughts welcome. |
Wouldn't style inlining for SPA be a completely new feature? From what I understand, |
|
Oh yes, you're quite right. I do think it would be a nice feature to inline default styles with a SPA, but no changes needed in this PR 😊 |
ssr: false
🔗 Linked issue
resolves nuxt/nuxt#15124
#7580
❓ Type of change
📚 Description
Currently, if SSR is enabled during build, the renderer tries to inline styles if
process.env.NUXT_INLINE_STYLESis true.It does not take the current request's
ssrContext.noSSRinto account.This leads to an error if SSR is disabled dynamically (e.g. using the
x-nuxt-no-ssrheader in a server middleware):My change here disables style inlining if
ssrContext.noSSRistrue.Resolves nuxt/nuxt#15124 and #7580 .
📝 Checklist