fix(web): preserve Rocket Loader exclusion in build

This commit is contained in:
Amruth Pillai
2026-07-28 08:38:05 +02:00
parent 1e665fbe7e
commit 93c06934bd
+11
View File
@@ -53,6 +53,17 @@ export default defineConfig({
},
plugins: [
{
name: "cloudflare-rocket-loader-bootstrap",
transformIndexHtml: {
order: "post",
handler: (html) =>
html.replace(
/<script\b(?=[^>]*\btype="module")(?=[^>]*\bsrc="\/assets\/[^"]+")(?![^>]*\bdata-cfasync=)[^>]*>/,
(script) => script.replace(">", ' data-cfasync="false">'),
),
},
},
devtools(),
tailwindcss(),
tanstackRouter({