diff --git a/src/extractStyle.ts b/src/extractStyle.ts index dd2b0fe..871a0c6 100644 --- a/src/extractStyle.ts +++ b/src/extractStyle.ts @@ -57,7 +57,9 @@ export default function extractStyle(cache: Cache, plain = false) { return null; } const [order, styleId, styleStr] = extractedStyle; - cachePathMap[cachePath] = styleId; + if (key.startsWith('style')) { + cachePathMap[cachePath] = styleId; + } return [order, styleStr]; }) .filter(isNotNull) diff --git a/tests/__snapshots__/css-variables.spec.tsx.snap b/tests/__snapshots__/css-variables.spec.tsx.snap index 55a0075..365a9e3 100644 --- a/tests/__snapshots__/css-variables.spec.tsx.snap +++ b/tests/__snapshots__/css-variables.spec.tsx.snap @@ -1,3 +1,3 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`CSS Variables > support ssr 1`] = `""`; +exports[`CSS Variables > support ssr 1`] = `""`;