Prototype: move Sass-Embedded to optionalDependencies#316
Open
acketon wants to merge 5 commits into
Open
Conversation
…alDependency and removes the reference in webpack.config.js that is loading it manually. Webpack & SASS Loader should now decide to use sass-embedded if it can. Testing this approach
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.
Description
This PR tests moving sass-embedded to the optionalDependencies. The documentation for webpack/sass-loader state that if you list sass-embedded as an optional dependency it will attempt to use it if it can, but if not, will fall back to using
sass(dart-sass in JS). This seems to work in my testing and would let us eliminate thesassCompilersetting and modification of the sass-loader in @wordpress/scripts.I could use some more help testing this though by using the command
timebeforenpm run build, etc. It's not easy to actually know which sass compiler is being used but going off the speed of the build should tell us if it is working. From my testing this works and it's slightly faster if I includesass-embeddedin theoptionalDependenciesvs removing it everywhere.Sandbox links
You can see my changes in the links below:
Browser support
I have tested my changes in the following browsers:
If your project requires browser testing beyond the latest two versions, such as IE9, please note this below.
Pre-review checklist for designers and developers
Information for reviewers
Work is only non-billable if it is a bug fix that occurs after the site has launched, or if the project has an unusual billing arrangement.