fix(index-file): fixed the double quote issue#849
Conversation
asollberger
commented
May 9, 2025
- fix for issue rendering incorrect script tags in index #836
- also fixed the body tag replacement string when attaching a class to body f.ex. it would not find it and add the esms-options
- 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
|
@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>/, |
There was a problem hiding this comment.
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? 🤔
There was a problem hiding this comment.
I like the idea, will have to tinker with the DOMParser and the XMLSerializer
|
Big thanks! |
|
@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 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 |