We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 519b062 + 626dfb4 commit f55c8feCopy full SHA for f55c8fe
libs/native-federation/src/utils/updateIndexHtml.ts
@@ -57,14 +57,14 @@ export function updateScriptTags(
57
`;
58
59
indexContent = indexContent.replace(
60
- /<script src="(.*?polyfills.*?)><\/script>/,
+ /<script src="(.*?polyfills.*?)".*?><\/script>/,
61
'<script type="module" src="$1"></script>'
62
);
63
64
- /<script src="(.*?main.*?)><\/script>/,
+ /<script src="(.*?main.*?)".*?><\/script>/,
65
'<script type="module-shim" src="$1"></script>'
66
67
68
- indexContent = indexContent.replace('<body>', `<body>${htmlFragment}`);
+ indexContent = indexContent.replace(/(<body.*?>)/, `$1\n\t\t${htmlFragment}`);
69
return indexContent;
70
}
0 commit comments