fix(sass): replace default import with ESM module import#17880
fix(sass): replace default import with ESM module import#17880roman-petrov wants to merge 1 commit intovitejs:mainfrom roman-petrov:fix/sass-default-import
Conversation
|
|
|
Hmm, interesting. Actually I don't quite remember why I had I can look into this further. Btw, can you provide a reproduction to show how this loading fails with tsx? Technically, there might be a different resolution issue on tsx side. |
|
Thanks for a fast response. Actually, I don't fully understand the source of this issue and I agree it might be better to have a fix for this in
I also noticed that without So it's my laziness, sorry for that :) I will try to prepare a reproduction for this issue with |
|
Just tried to create a minimal reproduction from scratch with Vite +
When I start Vite on this project using So maybe this issue is related with our company (quite large) project Vite plugins or other environment... (maybe, it is not related to @hi-ogawa WDYT, can this PR be merged or it is better just to close it and wait for future solutions?... |
|
I think I remembered why it uses vite/packages/vite/src/node/utils.ts Line 1057 in 321b213 and this picks up
Unless there's a reproduction to understand the issue, it's unlikely we can take an action here unfortunately. We'll probably close this PR unless anyone has some ideas what's going on. |
|
@hi-ogawa Thank you for the help! I am closing this for now. |
Description
Replaces default import from
sasswith module import. Defaultsassimport is deprecated and does not work with tsx imports.Without this change we get
Pre-transform error: [sass] Cannot read properties of undefined (reading 'initAsyncCompiler')error and it is not possible for us to migrate to sass compiler API +sass-embeddedpackage.@hi-ogawa, can you please help reviewing this?