Skip to content

Lazy loaded modules do not contain crossorigin attribute #16801

@rupebac

Description

@rupebac

🐞 bug report

Affected Package

@angular-devkit/build-angular

Is this a regression?

No

Description

Specifying 'crossOrigin: "anonymous"' in angular.json makes angular cli to add the corresponding attribute in the <script> elements of the <body>, but angular is still not appending it in the lazy loaded modules in the <head> during runtime.

Lazy loaded modules will only contain the crossorigin attribute hardcoded to 'anonymous', only if "subresourceIntegrity" is true. In this case, also the integrity attribute is added, and in our case this is not desired.

Expected is, that <script> from lazy loaded modules behave in the same way as <script> from angular.

🌍 Your Environment

"@angular/cli": "8.3.18",
"@angular/compiler-cli": "8.2.13",
"@angular/language-service": "8.2.13",

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions