mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +00:00
fix(vite): inline styles for vue components with lang="ts"
(#26912)
This commit is contained in:
parent
fdbfed1280
commit
af2e2da27c
@ -120,6 +120,9 @@ export function ssrStylesPlugin (options: SSRStylePluginOptions): Plugin {
|
|||||||
// Vue files can (also) be their own entrypoints as they are tracked separately
|
// Vue files can (also) be their own entrypoints as they are tracked separately
|
||||||
if (isVue(moduleId)) {
|
if (isVue(moduleId)) {
|
||||||
options.clientCSSMap[moduleId].add(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
|
// This is required to track CSS in entry chunk
|
||||||
if (isEntry) {
|
if (isEntry) {
|
||||||
|
Loading…
Reference in New Issue
Block a user