Skip to content
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

perf(@angular-devkit/build-angular): use esbuild as a CSS optimizer for component styles #21323

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

clydin
Copy link
Member

@clydin clydin commented Jul 9, 2021

The stylesheet optimization pipeline now uses esbuild for component stylesheets. The usage of esbuild provides noticeable build time improvements as well as, on average, smaller output sizes.
esbuild currently does not support stylesheet sourcemaps. However, since the Angular CLI does not support component stylesheet sourcemaps when optimizing, this lack of support is not problematic.
Global stylesheets will continue to use cssnano as an optimizer due to sourcemaps being required for global stylesheets even when optimizing. When esbuild adds stylesheet sourcemap support, global stylesheets may be transitioned to esbuild as well.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Jul 9, 2021
@google-cla google-cla bot added the cla: yes label Jul 9, 2021
@clydin clydin marked this pull request as ready for review July 9, 2021 21:25
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀

… for component styles

The stylesheet optimization pipeline now uses `esbuild` for component stylesheets. The usage of `esbuild` provides noticeable build time improvements as well as, on average, smaller output sizes.
`esbuild` currently does not support stylesheet sourcemaps. However, since the Angular CLI does not support component stylesheet sourcemaps when optimizing, this lack of support is problematic.
Global stylesheets will continue to use `cssnano` as an optimizer due to sourcemaps being required for global stylesheets even when optimizing. When `esbuild` adds stylesheet sourcemap support, global stylesheets may be transitioned to `esbuild` as well.
@clydin clydin force-pushed the esbuild-css-minifier branch from 7a84252 to 8df8197 Compare July 12, 2021 15:02
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 12, 2021
@filipesilva filipesilva merged commit fefd6d0 into angular:master Jul 13, 2021
@clydin clydin deleted the esbuild-css-minifier branch July 13, 2021 14:34
@demike
Copy link

demike commented Aug 8, 2021

The stylesheet optimization pipeline now uses esbuild for component stylesheets. The usage of esbuild provides noticeable build time improvements as well as, on average, smaller output sizes.
esbuild currently does not support stylesheet sourcemaps. However, since the Angular CLI does not support component stylesheet sourcemaps when optimizing, this lack of support is not problematic.
Global stylesheets will continue to use cssnano as an optimizer due to sourcemaps being required for global stylesheets even when optimizing. When esbuild adds stylesheet sourcemap support, global stylesheets may be transitioned to esbuild as well.

fyi: esbuild now supports css source maps.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants