diff --git a/package.json b/package.json index 629fb45..a921640 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "skate-spots", "private": true, - "version": "1.0.64", + "version": "1.0.65", "type": "module", "homepage": "https://skate-spots.com", "scripts": { diff --git a/vite.config.ts b/vite.config.ts index d90f576..0168f83 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -44,12 +44,17 @@ export default defineConfig(() => ({ transformMixedEsModules: true, }, rollupOptions: { - // Native Capacitor plugins have no JS entry point — they are injected - // at runtime by Capacitor on the native side. Exclude them from the bundle. + // IMPORTANT: installed Capacitor packages (@capacitor/core, @capacitor/camera) + // and the signer plugin MUST be bundled. Their JS API layer is real code that + // the WebView needs — the *native* implementation is injected at runtime via + // window.Capacitor, but the JS imports have to resolve. Externalizing them + // leaves bare `import "@capacitor/core"` specifiers in the output, which a + // native WebView cannot resolve → "Failed to resolve module specifier" crash. + // + // Only the Capacitor packages that are NOT installed are kept external, so a + // stray import can't break the build. If one of these is ever added to + // package.json, remove it from this list so it gets bundled. external: [ - 'nostr-signer-capacitor-plugin', - '@capacitor/camera', - '@capacitor/core', '@capacitor/app', '@capacitor/haptics', '@capacitor/keyboard',