perf(schema): only inline styles for vue components (#30305)

This commit is contained in:
Daniel Roe 2024-12-20 11:18:10 +00:00 committed by GitHub
parent e09b1d6659
commit c752ee1514
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,8 +59,8 @@ export default defineUntypedSchema({
if (val === false || (await get('dev')) || (await get('ssr')) === false || (await get('builder')) === '@nuxt/webpack-builder') {
return false
}
// Enabled by default for vite prod with ssr
return val ?? true
// Enabled by default for vite prod with ssr (for vue components)
return val ?? ((id: string) => id && id.includes('.vue'))
},
},