-
Notifications
You must be signed in to change notification settings - Fork 359
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
Import failure with sass.compile()
, sassEmbedded.renderSync()
and sassEmbedded.compile()
methods, but not with sass.renderSync()
method
#1920
Comments
I think the failure may be the expected behavior here at least in new API. In you example it is
dart-sass/lib/src/importer/legacy_node/implementation.dart Lines 148 to 156 in 09a5f09
We can change the behavior of legacy API in @nex3 Any thoughts? |
Anyway, whatever happens, I found a workaround. I think that the |
You can explicitly add |
Thanks for rooting this out, @Elysiome and @ntkme. In this case, we can't accurately emulate this behavior in the embedded host because the embedded host builds its legacy API support on top of the new API and the new API (by design) doesn't make it possible to distinguish between absolute and relative imports. I'm afraid this is one of the few cases where there's an unavoidable behavior difference between the two. |
Introduction
Hi,
I create this issue on @nex3 request.
The issue is simple to understand, there is an import failure with
sass.compile()
,sassEmbedded.renderSync()
andsassEmbedded.compile()
methods, but not withsass.renderSync()
method:Summary table:
[email protected]
renderSync()
[email protected]
compile()
[email protected]
renderSync()
[email protected]
compile()
Reproducible scenario
package.json
:style.scss
:index.js
:Context
Related comment:
v1.59
(8 times slower thanv1.58
) #1913 (comment)Node.js version:
18.14.2
The text was updated successfully, but these errors were encountered: