Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

FOUC on Next8 production build withCSS #455

@suppayami

Description

@suppayami

Bug report

Describe the bug

On a minimal project (only Next, React and Next-css are installed - check the repo below), there is FOUC on load. With the cache, it sometimes happens, with cache disabled, it happens all the time.

This problem doesn't happen in Next 7.

To Reproduce

Reproduce project: https://github.com/suppayami/test-fouc

  1. Run npm run build
  2. Run npm start
  3. Go to listening server and see the text with background, it has transition to easily notice the FOUC.

Expected behavior

There shouldn't be any FOUC on load.

System information

  • OS: macOS, Windows
  • Browser: Chrome
  • Version of Next.js: @^8.1.0

Additional context

The problem did not happen when I use Next.js @^7
It seems that this only happens if using next-css. Styled-jsx does not proc any FOUC.
This happens also in with-next-css example (put transition to style for easy notice): https://github.com/zeit/next.js/tree/master/examples/with-next-css

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions