Skip to content

Conversation

@martinaajonsson
Copy link
Contributor

To make the importer in your Sass preprocessOptions compatible with the new compileString() API (introduced in Dart Sass v1.56.0), you need to adjust the format of the importer to follow the new Importer API, which has changed how custom importers work.

⚠️ Key Changes in Dart Sass 1.56.0+ (and sass.compileString)

  • The new importer API uses an Importer object, not just a function.
  • This object must define a findFileUrl(url) method that returns a URL | null | Promise<URL | null>

In this PR I have rewritten the preprocessor importer to comply with the new compileString API. Tested locally and it now works with newer Vue-versions which was the original issue reported here: #30. (Current version of this package does not work with newer versions of vue or @vue/compiler-sfc > 3.5.11)

@pipe01
Copy link
Owner

pipe01 commented Oct 20, 2025

LGTM, thank you for looking into it and sorry for the delay!

@pipe01 pipe01 merged commit 1b8c667 into pipe01:master Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants