Coder Social home page Coder Social logo

Comments (8)

darthmaim avatar darthmaim commented on September 26, 2024 5

#64488 released in v14.3.0-canary.1 fixes this issue for me.

Based on that PR you can add this to your next.config.js as a workaround, if you don't want to run canary yet:

webpack(config, { dev }) {
  if(dev) {
    config.plugins = config.plugins.filter((plugin) => plugin.constructor.name !== 'CssChunkingPlugin');
  }
  return config;
}

@โ€‹maintainers: Since 14.3 is probably still some months off, could you release #64488 is 14.2.2?

Edit: The fix was now published in 14.2.2

from next.js.

dackom avatar dackom commented on September 26, 2024 4

I have the exact same issue on M1 mac. After clicking on any link, page loads without styles, then after refreshing it loads correctly. Same as in this video. Every page uses components and those components are using .module.scss

from next.js.

timneutkens avatar timneutkens commented on September 26, 2024 3

Since 14.3 is probably still some months off, could you release #64488 is 14.2.2?

We changed the canary naming scheme a while ago, it's no longer the case that commits can only land in the minor version but instead we create a separate branch with fixes for patch releases, so this will be part of the 14.2 patch release cycle ๐Ÿ‘

Going to close this issue as #64488 is indeed the fix for this issue ๐Ÿ‘

from next.js.

timneutkens avatar timneutkens commented on September 26, 2024

Tried to reproduce this multiple times on codesandbox using the repository but can't reproduce it: https://codesandbox.io/p/github/milkyfuckinway/nextjs14.2cssbug

Maybe it's Windows specific, will do some digging

from next.js.

sab91 avatar sab91 commented on September 26, 2024

Hello guys, we have the same issue on our side, it seems to happen only in dev mode.

We use Windows and macOS Sonoma with M1 Pro. WIth the codesandbox you shared @timneutkens I confirm the issue is visible.

Actually, we see this when navigating to the authorization page (form styles are missing):
image

What we noticed is when you check the source files into the chrome console, the css contained in _next/static/css is missing some styles and when refreshing the page it is added at the end of the file. I attached two files, one is the css at first load and the second is after refreshing the page. I hope it will help to find the issue.

css.zip

from next.js.

darthmaim avatar darthmaim commented on September 26, 2024

I also have this issue in my project, both on windows and macOS. I've tried multiple canary versions and found that v14.2.0-canary.28 is the first version with this issue, so the bug was likely introduced by #63157.

I also have this issue on pages that are not using a "wrapper component" as the title of this issue suggests, just the styles from my layout.tsx and none from the page.tsx are loaded when soft navigating between pages in dev mode. Refreshing the page will load all styles correctly.

Once the styles are loaded they will always load until the dev server is restarted.

from next.js.

Christopher-md avatar Christopher-md commented on September 26, 2024

I also reproduce the bug when using .modules.scss. MacOS M1. Next.js version - 14.2.1

from next.js.

github-actions avatar github-actions commented on September 26, 2024

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

from next.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.