Use gulp-sass ^6.0.1 and enable use of NodePackageImporter for Sass' pkg: protocol#18
Open
polarbirke wants to merge 8 commits intomasterfrom
Open
Use gulp-sass ^6.0.1 and enable use of NodePackageImporter for Sass' pkg: protocol#18polarbirke wants to merge 8 commits intomasterfrom
pkg: protocol#18polarbirke wants to merge 8 commits intomasterfrom
Conversation
… 'sass' for better compile performance
pkg: Protocol
pkg: Protocolpkg: protocol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In version 6.x gulp-sass has updated to using Sass' new JS API (see dlmanning/gulp-sass#846).
This requires small changes where options have changed:
includePathsloadPathsoutputStylestyleIn addition it is now possible to benefit from
pkg:Importers:webfactory-gulp-preset will make this available automatically if the configured compiler (we recommend
sass-embedded) supports it. Support landed in Dart Sass v1.71.0;node-sassdoes not support it and probably never will.Issues
❌ BC break: node-sass is no longer supported
gulp-sass' documentation suggests that version 6.x continues to support node-sass, but this is not true. dlmanning/gulp-sass#846 has switched to using the Sass compiler's internal
compileorcompileAsyncmethods which are not supported by node-sass (which only offers the legacyrenderandrenderAsync).Projects updating webfactory-gulp-preset would be required to migrate to Dart Sass.
NodePackageImporter()seems to requireentryPointDirectorywhen used via gulp-sass.entryPointDirectoryshould be optional when calling the constructor; however, when using it with gulp-sass errors occur if it is omitted:webfactory-gulp-preset always instantiates the importer with
new NodePackageImporter(config.webdir)whereconfig.webdiris theentryPointDirectory; this fixes the issue.