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

Styles for pages are not awaited #46868

Closed
1 task done
thearnica opened this issue Mar 7, 2023 · 2 comments
Closed
1 task done

Styles for pages are not awaited #46868

thearnica opened this issue Mar 7, 2023 · 2 comments
Labels
bug Issue was opened via the bug report template.

Comments

@thearnica
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.3.0: Sun Dec  4 18:17:21 PST 2022; root:xnu-8792.80.21.0.2~9/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.15.0
      npm: 8.5.5
      Yarn: 3.2.4
      pnpm: 7.0.0
    Relevant packages:
      next: 13.2.4-canary.4
      eslint-config-next: 12.1.6
      react: 18.2.0
      react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

Link to the code that reproduces this issue

https://github.com/Arctomachine/next-prefetch-css-modules-bug

To Reproduce

  • create one or more layouts
  • create a page
  • load the page

Describe the Bug

While layout.css will be properly awaited before rendering, page.css will be not and unstyled page content will be displayed for a brief period.

image

It is also important to note that layout.css and page.css have different origins.

image

Related:

Expected Behavior

page.css is awaited before rendering page content.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@thearnica thearnica added the bug Issue was opened via the bug report template. label Mar 7, 2023
@shuding
Copy link
Member

shuding commented May 19, 2023

This issue is fixed in newer versions with a test add in #47708. Let us know if you're still running into it, thanks!

@shuding shuding closed this as completed May 19, 2023
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants