Skip to content

Commit 93a1b28

Browse files
committed
fix: importmap shim async
1 parent 10a864b commit 93a1b28

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

web/landing/src/Flow/Website/Twig/ImportMapExtension.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ public function renderImportmap(string $entryPoint = 'app') : string
3939
$html
4040
);
4141

42+
// Remove async from es-module-shims to prevent race condition
43+
// The polyfill must load before module scripts execute
44+
$html = \str_replace(
45+
'<script async src="https://ga.jspm.io/npm:es-module-shims',
46+
'<script src="https://ga.jspm.io/npm:es-module-shims',
47+
$html
48+
);
49+
4250
return $html;
4351
}
4452
}

0 commit comments

Comments
 (0)