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

This commit is contained in:
Daniel Roe 2024-12-20 11:18:10 +00:00
parent 483435ba34
commit a4e77a1ca0
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -92,8 +92,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'))
},
},