We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2e0994 commit 658fa9aCopy full SHA for 658fa9a
packages/plugin-rsc/src/plugin.ts
@@ -1659,7 +1659,12 @@ export function vitePluginRscCss(
1659
const options = rscCssOptions?.rscCssTransform
1660
if (options === false) return false
1661
if (options?.filter && !options.filter(id)) return false
1662
- if (id.includes('/node_modules/') || !/\.[tj]sx$/.test(id)) return false
+ // https://github.com/vitejs/vite/blob/7979f9da555aa16bd221b32ea78ce8cb5292fac4/packages/vite/src/node/constants.ts#L95
1663
+ if (
1664
+ !/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)\b/.test(code) ||
1665
+ !/\.[tj]sx?$/.test(id)
1666
+ )
1667
+ return false
1668
1669
// skip transform if no css imports
1670
const result = esModuleLexer.parse(code)
0 commit comments