fix(css): fix missing source file warning with sass modern api custom importer#18113
Conversation
|
|
|
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! |
…modern api custom importer (#18183) Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com>
|
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 filesfor@importwith 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.devSourcemapworks only for the initial import of sass files, which is pretty bad, but I couldn't find any solution for this.sourceMapUrlworks #18113 (comment)