With what library do you have an issue?
native-federation
Reproduction of the bug/regression with instructions
When we include a global library through the project's angular.json file
Angular compiler adds the following tag:
<script src="scripts.js" defer></script>
before importing the main project file (main.js). This causes an incorrect transformation of the following tag:
<script src="main.js" type="module"></script>
Specifically, the type="module-shim" attribute is mistakenly applied to the scripts.js file tag instead of the main.js file tag. As a result, main.js file tag is left without the type="module" attribute
leading to the following error:
Expected behavior
- Tag
<script src="scripts.js" defer></script> should remain untouched and should not undergo any changes
- Tag
<script src="main.js" type="module"></script> should be modified to change the attribute from type="module" to type="module-shim".
Versions of Native/Module Federation, Angular, Node, Browser, and operating system
Native Federation: v20.0.7
Angular: v20.0.6
Node: v22.13.0
Browser: Chrome v138.0.7204.97
Operating System: Windows 10
Other information
No response
I would be willing to submit a PR to fix this issue
With what library do you have an issue?
native-federation
Reproduction of the bug/regression with instructions
When we include a global library through the project's
angular.jsonfileAngular compiler adds the following tag:
before importing the main project file (
main.js). This causes an incorrect transformation of the following tag:Specifically, the
type="module-shim"attribute is mistakenly applied to thescripts.jsfile tag instead of themain.jsfile tag. As a result,main.jsfile tag is left without thetype="module"attributeleading to the following error:
Expected behavior
<script src="scripts.js" defer></script>should remain untouched and should not undergo any changes<script src="main.js" type="module"></script>should be modified to change the attribute fromtype="module"totype="module-shim".Versions of Native/Module Federation, Angular, Node, Browser, and operating system
Native Federation: v20.0.7
Angular: v20.0.6
Node: v22.13.0
Browser: Chrome v138.0.7204.97
Operating System: Windows 10
Other information
No response
I would be willing to submit a PR to fix this issue