From 32b3a366b3f256638781fdbffa4a9e00096bd26c Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Thu, 23 Jul 2026 17:23:34 +0700 Subject: [PATCH] fix: move nostr-signer-capacitor-plugin to rollupOptions.external (top level) Co-authored-by: shakespeare.diy --- vite.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 425522f..8683bc1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -39,12 +39,15 @@ export default defineConfig(() => ({ transformMixedEsModules: true, }, rollupOptions: { + // nostr-signer-capacitor-plugin is a native Capacitor plugin — it has no + // JS entry point and must be excluded from the bundle entirely. + // The plugin is injected at runtime by Capacitor on the native side. + external: ['nostr-signer-capacitor-plugin'], output: process.env.CAPACITOR_BUILD ? { // Single bundle for Capacitor APK — avoids 100+ chunk file requests // that fail silently in Android WebView local file serving manualChunks: undefined, inlineDynamicImports: true, - external: ['nostr-signer-capacitor-plugin'], } : { // Split large vendor libraries into separate cacheable chunks. // Users only re-download a chunk when that specific library updates.