mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 15:50:32 +00:00
fix(nuxt): render stylesheets in dev for non-islands (#25243)
This commit is contained in:
parent
1be0ca1a3a
commit
adb91ba18c
@ -372,7 +372,7 @@ export default defineRenderHandler(async (event): Promise<Partial<RenderResponse
|
|||||||
const link = []
|
const link = []
|
||||||
for (const style in styles) {
|
for (const style in styles) {
|
||||||
const resource = styles[style]
|
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) })
|
link.push({ rel: 'stylesheet', href: renderer.rendererContext.buildAssetsURL(resource.file) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user