-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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(css): fix missing source file warning with sass modern api custom importer #18113
Conversation
Run & review this pull request in StackBlitz Codeflow. |
https://sass-lang.com/documentation/js-api/interfaces/importerresult/#sourceMapUrl vite/packages/vite/src/node/plugins/css.ts Line 2303 in 993d45b
Could you try to see if it works? |
…i custom importer" This reverts commit 4536314.
Oops, I totally missed that somehow. This totally works, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
…modern api custom importer (#18183) Co-authored-by: Hiroshi Ogawa <[email protected]>
Will it be merged into v4? |
@Defite I guess you meant v5. It's been released in 5.4.8. |
Nope, I meant v4, because I can't migrate to v5 right now. I've solved my issue by downgrading sass version to lower one. |
We don't have plan to backport this PR to v4 for now. |
I got it, thanks for answer! |
@Defite Is it possible the warning you're seeing is "legacy js API" one like in #18164? I thought downgrading sass version wouldn't matter for sourcemap warning on modern API, which is what this PR is fixing. |
Yes, the message is the same as in #18164. But somehow after downgrading sass version I don't see this messages anymore. |
@Defite Okay, so the warning you see is not technically same as this PR. If you follow the link in the warning https://sass-lang.com/documentation/breaking-changes/legacy-js-api, I think you should be able to still upgrade sass and use modern API (though you cannot use |
@hi-ogawa yep, sorry for bothering in wrong PR. |
Description
Sourcemap for ... points to missing source files
for@import
with sass modern api #18111I addedEDIT:data:
to "missing source" false positive list since Sass modern API usesdata:...
when the code is loaded from custom importer. This would meancss.devSourcemap
works only for the initial import of sass files, which is pretty bad, but I couldn't find any solution for this.sourceMapUrl
works #18113 (comment)