From 527a6df185ee60f550e535cb01128489444ffbf1 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 27 Oct 2026 00:42:23 +0800 Subject: [PATCH] fix(website): stop emitting Worker source maps @cloudflare/vite-plugin 1.65 emits Worker source maps by default. They raised the modules `void deploy` uploads from 413 to 744 and pushed the Worker upload past the platform timeout. Co-Authored-By: Claude Opus 5.5 --- website/vite.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/vite.config.ts b/website/vite.config.ts index 5f18744b..d8f31211 100644 --- a/website/vite.config.ts +++ b/website/vite.config.ts @@ -74,6 +74,11 @@ export default defineConfig({ // the default 'iife' worker format cannot handle the top-level await in the // wasm package, which fails the build. format:'es' fixes the nested worker. worker: { format: 'es' }, + // @cloudflare/vite-plugin emits Worker source maps unless build.sourcemap says + // otherwise. They nearly double the modules `void deploy` uploads (~330 .map + // files on top of ~410 .js), which pushed the Worker upload past its timeout. + // The client never had maps, so this only changes the Worker output. + build: { sourcemap: false }, resolve: { // The playground worker imports the public `@napi-rs/image` API, but in the // browser that wrapper's `main` (index.js) is the universal NATIVE loader — it