Skip to content

Commit

Permalink
fix(@angular/build): relax constraints on external stylesheet compone…
Browse files Browse the repository at this point in the history
…nt id

The number of digits in the component identifier that is generated at runtime
can vary. The check for a valid identifier now accounts for this case.
  • Loading branch information
clydin committed Oct 17, 2024
1 parent 1f4428f commit 1654acf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function createAngularAssetsMiddleware(
// Shim the stylesheet if a component ID is provided
if (componentId.length > 0) {
// Validate component ID
if (/^[_.\-\p{Letter}\d]+-c\d{9}$/u.test(componentId)) {
if (/^[_.\-\p{Letter}\d]+-c\d+$/u.test(componentId)) {
loadEsmModule<typeof import('@angular/compiler')>('@angular/compiler')
.then((compilerModule) => {
const encapsulatedData = compilerModule.encapsulateStyle(
Expand Down

0 comments on commit 1654acf

Please sign in to comment.