Skip to content

Commit

Permalink
Merge pull request #1048 from simonihmig/fix-fastboot-imported-css
Browse files Browse the repository at this point in the history
Fix imported CSS with FastBoot
  • Loading branch information
ef4 authored Dec 21, 2021
2 parents 0c23a6b + 93f79ac commit b118e51
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core/src/html-entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ function maybeInsertLazyBundles(
): boolean {
if (!insertedLazy && placeholder.isScript()) {
for (let bundle of lazyBundles) {
let element = placeholder.start.ownerDocument.createElement('fastboot-script');
element.setAttribute('src', publicAssetURL + bundle);
placeholder.insert(element);
placeholder.insertNewline();
if (bundle.endsWith('.js')) {
let element = placeholder.start.ownerDocument.createElement('fastboot-script');
element.setAttribute('src', publicAssetURL + bundle);
placeholder.insert(element);
placeholder.insertNewline();
}
}
return true;
}
Expand Down

0 comments on commit b118e51

Please sign in to comment.