Skip to content

Commit

Permalink
fix: keep stylesheet in fallback html
Browse files Browse the repository at this point in the history
  • Loading branch information
SegaraRai committed Nov 16, 2024
1 parent 4f20279 commit d860a82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion preset/nitro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function createFallbackHTML(baseHTML: string): string {
const window = new Window();
const dom = new window.DOMParser().parseFromString(baseHTML, "text/html");
for (const element of dom.querySelectorAll(
"link[href*=api.nature.global], link[crossorigin]:not([href*=cloudflareinsights.com]), script[src]:not([src*=cloudflareinsights.com]), script#__NUXT_DATA__"
"link[href*=api.nature.global], link[crossorigin]:not([rel=stylesheet]):not([href*=cloudflareinsights.com]), script[src]:not([src*=cloudflareinsights.com]), script#__NUXT_DATA__"
)) {
console.log("Removing element from fallback html", element.outerHTML);
element.remove();
Expand Down

0 comments on commit d860a82

Please sign in to comment.