fix(nuxt): render stylesheets in dev for non-islands (#25243)

This commit is contained in:
Daniel Roe 2024-01-16 23:17:38 +00:00 committed by GitHub
parent 1be0ca1a3a
commit adb91ba18c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -372,7 +372,7 @@ export default defineRenderHandler(async (event): Promise<Partial<RenderResponse
const link = []
for (const style in styles) {
const resource = styles[style]
if (!import.meta.dev || (resource.file.includes('scoped') && !resource.file.includes('pages/'))) {
if (!import.meta.dev || !isRenderingIsland || (resource.file.includes('scoped') && !resource.file.includes('pages/'))) {
link.push({ rel: 'stylesheet', href: renderer.rendererContext.buildAssetsURL(resource.file) })
}
}