fix: move nostr-signer-capacitor-plugin to rollupOptions.external (top level)

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
shakespeare.diy 2026-07-23 17:23:34 +07:00
parent 3b29089df2
commit 32b3a366b3

View file

@ -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.