Skip to content

Conversation

@asollberger
Copy link

- also fixed the body replacement string
When attaching a class to body f.ex. <body class="mat-typography"> it would not find it and add the esms-options
@asollberger
Copy link
Author

@manfredsteyer the function updateScriptTags does not use the parameters mainName or polyfillsName anymore. I could remove them as well and refactor the few places where it's called unless you have plans to reactivate that behavior again.

);
indexContent = indexContent.replace(
/<script src="(.*?main.*?)><\/script>/,
/<script src="(.*?main.*?)".*?><\/script>/,

Choose a reason for hiding this comment

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

If other builders setup other script tag attributes it will break them. Ain't there a way to parse the HTML node as a key value data structure easy to manipulate? 🤔

Copy link
Author

Choose a reason for hiding this comment

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

I like the idea, will have to tinker with the DOMParser and the XMLSerializer

@manfredsteyer manfredsteyer merged commit f55c8fe into angular-architects:main May 30, 2025
1 check passed
@manfredsteyer
Copy link
Contributor

Big thanks!

@Remy-Luciani
Copy link

@manfredsteyer FYI, I thought the 19.0.23 was free of this bug. Nevertheless, for unknown reasons, on a micro-frontend we have with my current team, the whole type="module-shim" attribute is missing on the <script> tag. We rolled back the dependency to 19.0.9 on our project.

As soon as we are out of the rush (IT project, you know 😅 ), I'll try to make a unit tested fix with proper DOM parsing!

cc @Melpemonia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants