Dynamically import @cloudflare/vite-plugin only when CF_WORKERS=1 to avoid punycode deprecation noise on normal builds. Raise chunkSizeWarningLimit for the lazy-loaded Mermaid chunk and set tsconfig.node target to ES2022 for top-level await in vite.config.ts.