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

fix(turbopack): error while compile module sass, filename mismatched with loc #74309

Open
wants to merge 3 commits into
base: canary
Choose a base branch
from

Conversation

nnnnoel
Copy link

@nnnnoel nnnnoel commented Dec 26, 2024

Fixing a bug

AS-IS

./app/global.module.scss.module.css:10:7
Parsing css source code failed
       8 |   &.children {
       9 |     :global {
    > 10 |       .inner {
         |       ^
      11 |         background-color: #f00;
      12 |       }
      13 |     }
    
Ambiguous CSS module class not supported at [project]/app/global.module.scss.module.css:0:122

TO-BE

./app/global.module.scss:10:7
Parsing css source code failed
       8 |   &.children {
       9 |     :global {
    > 10 |       .inner {
         |       ^
      11 |         background-color: #f00;
      12 |       }
      13 |     }
    
    Ambiguous CSS module class not supported at [project]/app/global.module.scss.module.css:0:122

For Maintainers

  • Minimal description (aim for explaining to someone not on the team to understand the PR)
  • When linking to a Slack thread, you might want to share details of the conclusion
  • Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
  • Add review comments if necessary to explain to the reviewer the logic behind a change

What?

Why?

loc of error locates origin file(global.module.scss), but the filename is already renamed module css file.

How?

I replaced reported FileSystemPath to new FileSystemPath without extension.
for the sass files, origin file path already renamed in rules from maybe_add_sass_loader.
But i'm not sure it's right way to fix the problem.

@ijjk ijjk added the tests label Dec 26, 2024
@ijjk
Copy link
Member

ijjk commented Dec 26, 2024

Allow CI Workflow Run

  • approve CI run for commit: 6924836

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@nnnnoel nnnnoel marked this pull request as ready for review December 27, 2024 08:04
@nnnnoel nnnnoel force-pushed the fix/turbopack-css-error-log-filename branch from 6d308ae to 6924836 Compare December 27, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants