-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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(sass): replace default import with ESM module import #17880
Conversation
Run & review this pull request in StackBlitz Codeflow. |
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
sass
with module import. Defaultsass
import 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-embedded
package.@hi-ogawa, can you please help reviewing this?