Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR substantially improves the performance of custom importers that return paths without source contents, by using FileImporter to load file from disk directly on dart-sass side, instead of reading from on ruby side and then passing to dart-sass via protobuf.
The current sass module resolution spec does not allow file extensions other than the standard
['.sass', '.scss', '.css']
. The dart-sass implementation does not resolve if a custom FileImporter returns a url with non-standard extension. However, loading of sass files with non-standard extensions is used in sprockets. Therefore, in such case we have to fallback to an Importer to read the file on ruby side.