Vite Import Error
asudevprj opened this issue · 2 comments
Describe the bug
Import error, see error description below.
The error only happens when using vite. Webpack works just fine
To Reproduce
Steps to reproduce the behavior:
-
Create a project with quasar and vite support
-
import { BleClient } from '@capacitor-community/bluetooth-le'
-
Start dev server
-
Error:
[vite] error while updating dependencies:
Vite Error, /node_modules/.q-cache/vite/spa/deps/@capacitor-community_bluetooth-le.js?v=6173ba5e
X [ERROR] Could not resolve "@capacitor/core"node_modules/@capacitor-community/bluetooth-le/dist/esm/plugin.js:1:31:
1 │ import { registerPlugin } from '@capacitor/core';
╵ ~~~~~~~~~~~~~~~~~
You can mark the path "@capacitor/core" as external to exclude it from the bundle, which will
remove this error.
Plugin version:
- bluetooth-le: 2.01
- capacitor 4.0
Additional context
Other plugins (e.g. sqlite) work as expected.
bluetooth-le with webpack works as expected