diff --git a/.changeset/bright-cooks-pay.md b/.changeset/bright-cooks-pay.md new file mode 100644 index 000000000..01d8b5e34 --- /dev/null +++ b/.changeset/bright-cooks-pay.md @@ -0,0 +1,5 @@ +--- +'@vanilla-extract/next-plugin': patch +--- + +Fixes Next.js 13.5.x CSS output on Windows when using React Server Components diff --git a/packages/next-plugin/src/index.ts b/packages/next-plugin/src/index.ts index 3a67ac522..313982d02 100644 --- a/packages/next-plugin/src/index.ts +++ b/packages/next-plugin/src/index.ts @@ -115,9 +115,8 @@ export const createVanillaExtractPlugin = ( dir, resolvedNextConfig.experimental?.appDir ?? false, ); - const hasAppDir = - !!resolvedNextConfig.experimental?.appDir && - !!(findPagesDirResult && findPagesDirResult.appDir); + // Skip nextConfig check since appDir is stable feature after Next.js 13.4 + const hasAppDir = !!(findPagesDirResult && findPagesDirResult.appDir); const outputCss = hasAppDir ? // Always output css since Next.js App Router needs to collect Server CSS from React Server Components