-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(@angular-devkit/build-angular): switch to use Sass modern API #23624
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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
.