Repository navigation
build: update beasties to 0.5.1 - #34014
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the beasties dependency to version 0.5.1 and refactors the inline critical CSS processing logic to utilize its new features, such as the native nonce option and the data-beasties-media attribute. The review feedback highlights a potential Content Security Policy (CSP) bypass risk where returning null instead of undefined for the CSP nonce could cause Beasties to output a literal nonce="null" attribute. Additionally, defensive programming is suggested by using optional chaining when calling remove() on elements cast to any to prevent potential runtime crashes.
93cfd0d to
1600c1a
Compare
1600c1a to
b20f287
Compare
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.
b20f287 to
521feec
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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
inlineCriticalCssin @angular/build into astandalone function and relocates
InlineCriticalCssProcessorinto@angular-devkit/build-angular for Webpack-based builders.