Skip to content

build: update beasties to 0.5.1 - #33990

Closed
alan-agius4 wants to merge 2 commits into
angular:mainfrom
alan-agius4:update-beasties
Closed

build: update beasties to 0.5.1#33990
alan-agius4 wants to merge 2 commits into
angular:mainfrom
alan-agius4:update-beasties

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Updates Beasties to version 0.5.1 and simplifies the inline critical CSS implementation in @angular/build and @angular/ssr by using Beasties' native preload: 'media-script' and nonce callback support.

Additionally, refactors inlineCriticalCss in @angular/build into a standalone function and relocates InlineCriticalCssProcessor into @angular-devkit/build-angular for Webpack-based builders.

@angular-robot angular-robot Bot added the area: build & ci Related the build and CI infrastructure of the project label Sep 2, 2026
@alan-agius4 alan-agius4 added the target: minor This PR is targeted for the next minor release label Sep 2, 2026
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the beasties dependency to version 0.5.0 and refactors InlineCriticalCssProcessor to leverage native CSP nonce and preload features, simplifying the codebase by removing custom overrides. Additionally, outputPath has been moved from the process options to the constructor options of IndexHtmlGenerator, with corresponding updates across builders, plugins, and tests. A critical issue was identified in IndexHtmlWebpackPlugin where passing the full file path instead of the directory path to super() will break path resolution during Webpack builds.

@alan-agius4
alan-agius4 force-pushed the update-beasties branch 2 times, most recently from 74579dc to 760c822 Compare September 2, 2026 11:18
@alan-agius4 alan-agius4 changed the title build: update beasties to 0.5.0 build: update beasties to 0.5.1 Sep 2, 2026
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 2, 2026
Updates Beasties to version 0.5.1 and simplifies the inline critical CSS
implementation in @angular/build and @angular/ssr by using Beasties'
native preload: 'media-script' and nonce callback support.

Additionally, refactors `inlineCriticalCss` in @angular/build into a
standalone function and relocates `InlineCriticalCssProcessor` into
@angular-devkit/build-angular for Webpack-based builders.
@alan-agius4 alan-agius4 added state: blocked action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 2, 2026
@alan-agius4
alan-agius4 marked this pull request as ready for review September 2, 2026 17:39
@alan-agius4
alan-agius4 requested a review from clydin September 2, 2026 17:39

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the beasties dependency from version 0.4.3 to 0.5.1 and refactors the critical CSS inlining logic across several packages. The custom overrides and manual script injections previously used to handle CSP nonces and asynchronous stylesheet loading have been replaced by native beasties options, such as preload: 'media-script' and the nonce callback. Additionally, the InlineCriticalCssProcessor has been simplified, and corresponding tests and builder integrations have been updated to reflect the new data-beasties-media attribute. Feedback on this PR includes a reminder to remove the temporary 'beasties' exclusion and its associated TODO comment from pnpm-workspace.yaml before merging.

Comment thread pnpm-workspace.yaml Outdated
@alan-agius4 alan-agius4 closed this Sep 3, 2026
@alan-agius4
alan-agius4 deleted the update-beasties branch September 3, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: build & ci Related the build and CI infrastructure of the project target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant