Skip to content

Commit

Permalink
fix: Preload request credentials mode does not match warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Feb 15, 2023
1 parent 778cc19 commit e9dd7d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/utils/prefetchTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ if (isProduction) {
if (file.endsWith(".js")) {
prefetchTags.push(
<link
rel="preload"
rel="prefetch"
href={`${env.CDN_URL || ""}/static/${file}`}
key={file}
as="script"
crossOrigin="anonymous"
/>
);
} else if (file.endsWith(".css")) {
Expand All @@ -52,11 +53,11 @@ if (isProduction) {
href={`${env.CDN_URL || ""}/static/${file}`}
key={file}
as="style"
crossOrigin="anonymous"
/>
);
}
});
}

// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'Element[]' is not assignable to ... Remove this comment to see the full error message
export default ReactDOMServer.renderToString(prefetchTags);
export default ReactDOMServer.renderToString(<>{prefetchTags}</>);

0 comments on commit e9dd7d5

Please sign in to comment.