fix(vite): inline styles for vue components with lang="ts" (#26912)

This commit is contained in:
Daniel Roe 2024-04-24 11:43:06 +01:00 committed by GitHub
parent fdbfed1280
commit af2e2da27c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,6 +120,9 @@ export function ssrStylesPlugin (options: SSRStylePluginOptions): Plugin {
// Vue files can (also) be their own entrypoints as they are tracked separately
if (isVue(moduleId)) {
options.clientCSSMap[moduleId].add(moduleId)
const parent = moduleId.replace(/\?.+$/, '')
options.clientCSSMap[parent] ||= new Set()
options.clientCSSMap[parent].add(moduleId)
}
// This is required to track CSS in entry chunk
if (isEntry) {