Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(next-plugin): Next.js 13.5.x build not outputting css on windows #1193

Merged
merged 4 commits into from
Nov 9, 2023

Conversation

syfxlin
Copy link
Contributor

@syfxlin syfxlin commented Oct 2, 2023

CSS output is not working again in Next.js 13.5.x and Windows.
The resolvedNextConfig.experimental.appDir is no longer available in Next.js 13.5.x, so this pre-condition has been removed.

References: https://github.com/vercel/next.js/blob/76e06d55a8c42090dafda25ec31d9eeaa7ec647c/packages/next/src/build/index.ts#L418-L422

@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2023

🦋 Changeset detected

Latest commit: 602b1d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vanilla-extract/next-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ha1fstack
Copy link

ha1fstack commented Oct 16, 2023

I think comments can be changed a bit

// https://github.com/vercel/next.js/blob/5b52e7772dd6237474931ba4bbb856fbc33142ad/packages/next/src/build/index.ts#L431
// https://github.com/vercel/next.js/blob/5b52e7772dd6237474931ba4bbb856fbc33142ad/packages/next/src/build/webpack-config.ts#L493
// https://github.com/vercel/next.js/pull/43916
// on Next.js 12, findPagesDirResult is a string. on Next.js 13, findPagesDirResult is an object
const findPagesDirResult = findPagesDir(
  dir,
  resolvedNextConfig.experimental?.appDir ?? false,
);
// Skip nextConfig check since appDir is stable feature after Next.js 13.4
const hasAppDir = !!(findPagesDirResult && findPagesDirResult.appDir);

Copy link
Contributor

@askoufis askoufis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Feel free to add the comments suggested in #1193 (comment), but they shouldn't block the PR.

@askoufis askoufis requested a review from a team October 24, 2023 22:09
@syfxlin
Copy link
Contributor Author

syfxlin commented Oct 29, 2023

Hi @askoufis, I added the comment suggested in add #1193, but I don't have access to merge pull request, can you help with that?

@askoufis askoufis merged commit a22dd4d into vanilla-extract-css:master Nov 9, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants