I want to develop an app with capacitor without using ionic. How can I use the capacitor plugins this way? I added the electron and android build targets. If I include a script app.js from index.html with the following:
import { Capacitor } from '@capacitor/core';
import { Plugins } from '@capacitor/core';
I had to: <script type="module" src="assets/js/app.js"></script>
which produces the error:
Uncaught TypeError: Failed to resolve module specifier "@capacitor/core". Relative references must start with either "/", "./", or "../".**.
I also tried import { Capacitor } from '../../../node_modules/@capacitor/core'; which didn't work but even if it had, that wouldn't be good for Android target.
What should the path be or is there some other script that can run concurrently and interact with the dom thread like electron and still be compatible with android/ios? I must be doing something wrong.