feat(@angular-devkit/build-angular): switch to use Sass modern API#23624
Merged
Conversation
4fe1a6c to
2361cc3
Compare
d01a6d4 to
6c06936
Compare
e70491a to
19a69dc
Compare
19a69dc to
c748753
Compare
740b223 to
80988aa
Compare
60f5b60 to
91161d8
Compare
91161d8 to
d07bacc
Compare
d07bacc to
392e317
Compare
d0dae7f to
503e917
Compare
clydin
approved these changes
Sep 26, 2022
Member
clydin
left a comment
There was a problem hiding this comment.
Should we add a note to the breaking change description about the environment variable?
| // scss also from the cwd and project root. | ||
| // See: https://github.com/webpack-contrib/sass-loader/blob/997f3eb41d86dd00d5fa49c395a1aeb41573108c/src/utils.js#L307 | ||
| projectRoot, | ||
| path.join(root, 'node_modules'), |
Member
There was a problem hiding this comment.
This workaround won't support package exports fields nor Yarn PnP. We'll need to do a followup with a fix for this. Probably a custom Sass importer that tries node resolution first from the project root.
Collaborator
Author
There was a problem hiding this comment.
Yes, I already have some ideas for that.
Sass modern API provides faster compilations times when used in an async manner. |Application compilation duration | Sass API and Compiler| |-- | --| |60852ms | dart-sass legacy sync API| |52666ms | dart-sass modern API| Note: https://github.com/johannesjo/super-productivity was used for benchmarking. Prior art: http://docs/document/d/1CvEceWMpBoEBd8SfvksGMdVHxaZMH93b0EGS3XbR3_Q?resourcekey=0-vFm-xMspT65FZLIyX7xWFQ BREAKING CHANGE: - Deprecated support for tilde import has been removed. Please update the imports by removing the `~`. Before ```scss @import "~font-awesome/scss/font-awesome"; ``` After ```scss @import "font-awesome/scss/font-awesome"; ``` - By default the CLI will use Sass modern API, While not recommended, users can still opt to use legacy API by setting `NG_BUILD_LEGACY_SASS=1`.
503e917 to
a25c88f
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Sass modern API provides faster compilations times when used in an async manner.
Note: https://github.com/johannesjo/super-productivity was used for benchmarking.
Prior art: http://docs/document/d/1CvEceWMpBoEBd8SfvksGMdVHxaZMH93b0EGS3XbR3_Q?resourcekey=0-vFm-xMspT65FZLIyX7xWFQ
BREAKING CHANGE:
~.Before
After
NG_BUILD_LEGACY_SASS=1.