feat: improve nextjs proxying mode

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-25 11:43:54 +01:00
parent 86903b1937
commit 6da8267509
9 changed files with 184 additions and 94 deletions

View File

@@ -68,9 +68,17 @@ export function OpenPanelComponent({
value: globalProperties,
});
}
const appendVersion = (url: string) => {
if (url.endsWith('.js')) {
return `${url}?v=${process.env.NEXTJS_VERSION!}`;
}
return url;
};
return (
<>
<Script src={cdnUrl ?? CDN_URL} async defer />
<Script src={appendVersion(cdnUrl || CDN_URL)} async defer />
<Script
strategy="beforeInteractive"
dangerouslySetInnerHTML={{