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

Turbopack fails to pack css.modules with utf8-bom encoding #72247

Open
Martinii89 opened this issue Nov 3, 2024 · 0 comments
Open

Turbopack fails to pack css.modules with utf8-bom encoding #72247

Martinii89 opened this issue Nov 3, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.

Comments

@Martinii89
Copy link

Link to the code that reproduces this issue

https://github.com/Martinii89/nextjs-turbo-bom-bug

To Reproduce

  1. Start the application in dev mode using the --turbo option
  2. The one page uses two identical css classes from two different css module files. One is encoded with utf8. The other with utf8-bom
  3. Only the css module with utf8 encoding is applied correctly
    image

Screenshot of the css styles in the devtools of chrome shows a error on one of the styles
image

Current vs. Expected behavior

Expected behaviour is that the css modules with utf8-bom encoding does not fail to apply. Currently the first selector will become invalid when utf8-bom is used.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 16222
  Available CPU cores: 12
Binaries:
  Node: 20.13.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.3-canary.4 // Latest available version is detected (15.0.3-canary.4).
  eslint-config-next: N/A
  react: 19.0.0-rc-7c8e5e7a-20241101
  react-dom: 19.0.0-rc-7c8e5e7a-20241101
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

Turbopack

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

next dev (local)

Additional context

No response

@Martinii89 Martinii89 added the bug Issue was opened via the bug report template. label Nov 3, 2024
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label Nov 3, 2024
@timneutkens timneutkens added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants