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

Hot reloading still loads CSS modules before global CSS #12004

Closed
sparkertime opened this issue Apr 18, 2020 · 1 comment · Fixed by #12090
Closed

Hot reloading still loads CSS modules before global CSS #12004

sparkertime opened this issue Apr 18, 2020 · 1 comment · Fixed by #12090
Assignees
Milestone

Comments

@sparkertime
Copy link
Contributor

sparkertime commented Apr 18, 2020

Bug report

Describe the bug

My fix for #10148 only fixes the issue on the initial page load. Triggering a hot reload in dev for a CSS script once again loads CSS modules before global CSS.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Pull latest next.js and run yarn next ./test/integration/css-fixtures/global-and-module-ordering
  2. Make any edit to CSS that causes hot reloading to trigger (e.g. add a space after color: blue; in test/integration/css-fixtures/global-and-module-ordering/pages/index.module.css
  3. Watch the text change color from blue to red.

Expected behavior

When the page hot reloads, the CSS ordering should remain consistent

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: n/a
  • Browser (if applies) n/a
  • Version of Next.js: latest (9.3.6-canary.0 and greater)
  • Version of Node.js: v10.14.0

Additional context

Add any other context about the problem here.

@Timer Timer added this to the 9.3.6 milestone Apr 22, 2020
@Timer Timer self-assigned this Apr 22, 2020
Timer added a commit that referenced this issue Apr 22, 2020
* Failing test to demonstrate issue #12004

* Separate position for global vs client scripts. Fixes #12004

* Revert client.ts

* Revert global.ts

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants