Skip to content

Unable to load dynamic imports with vite #109

@DinosaurDad

Description

@DinosaurDad

Resources:

dependencies:
@capacitor/camera 1.3.1
@capacitor/core 3.4.3
@ionic/pwa-elements 3.1.1
@ionic/vue 6.0.13
vue 3.2.31
vue-router 4.0.14

devDependencies:
@vitejs/plugin-vue 2.2.4
vite 2.8.6

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:
Error when trying to use the PWA Elements camera with vite:

Expected behavior:
Module should load and a modal camera should appear.

Steps to reproduce:
Build, run, and push the SNAP button.

Related code:

https://github.com/DinosaurDad/capacitor-pwa-camera-vite

Other information:

Error and call stack:

TypeError: Failed to fetch dynamically imported module:
   http://localhost:3000/node_modules/.vite/pwa-action-sheet.entry.js
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'isProxied')
    at core-f86805ad.js:1176:25
    at step (core-f86805ad.js:45:23)
    at Object.next (core-f86805ad.js:26:53)
    at fulfilled (core-f86805ad.js:17:58)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions