Skip to content

[Turbopack] Styles from SCSS module not loading when not-found.tsx is present (Turbopack only)Β #82497

@GlebKodrik

Description

@GlebKodrik

Link to the code that reproduces this issue

https://github.com/GlebKodrik/Next-js-turbopack

To Reproduce

  1. Use Next.js with Turbopack (next dev --turbo)
  2. Have both PageLayout.module.scss and not-found.tsx in the project
  3. Styles from the SCSS module fail to load (class PageLayout-module-scss)
Image Image

Current vs. Expected behavior

  1. No styles applied when not-found.tsx exists
  2. Removing not-found.tsx immediately fixes the styling
Image Image

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T8132
  Available memory (MB): 24576
  Available CPU cores: 10
Binaries:
  Node: 20.14.0
  npm: 10.7.0
Relevant Packages:
  next: 15.4.6
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

CSS

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSSRelated to CSS.TurbopackRelated to Turbopack with Next.js.locked

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions