Allow use capacitor package in web
See original GitHub issueIs your feature request related to a problem? Please describe.
I have a capacitor app, the Capacitor plugins like Geolocation or Storage allows to work in the browser, but quasar didn’t allow to use the capacitor mode without load an IDE, and the normal quasar dev
doesn’t load the capacitor libs
Describe the solution you’d like
Add a new -T [android|ios|web]
in -m capacitor
, same as quasar dev
but loading the capacitor libds
Describe alternatives you’ve considered
Create a compatibility layers detecting the platforms and use different solutions, but fails with quasar dev
because can’t load the “@capacitor/core” module.
In quasar dev -m capacitor -T android
I can’t access from the browser, I don’t know why.
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (10 by maintainers)
Top Results From Across the Web
Capacitor by Ionic - Cross-platform apps with web technology
Capacitor is an open source native runtime for building Web Native apps. Create cross-platform iOS, Android, and Progressive Web Apps with JavaScript, HTML, ......
Read more >How to Use Capacitor Plugins: Core & Others - Ionic.io
Learn how to use Capacitor Core Plugins as well as those made by the community. These allow portals to use native functionality with...
Read more >From Web to Native with Capacitor | by Emmanuel Aina
Without saying too much, let's dive into how to use ionic's capacitor to build out our web solution as an Android app (same...
Read more >How to package a hosted web app with Ionic Capacitor
I could be some problem on the bundler. If you use the plugin without the bundler (regular Capacitor. · @jcesarmobile Thanks. · You...
Read more >Capacitor: Running a Web App on Mobile - DigitalOcean
Capacitor is a great way to take your JavaScript apps and get them running on iOS or Android. Let's use a React and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For the record (I just receive an email asking my solution).
I ended doing
quasar dev -m capacitor -T android
, close Android Studio and open the link in the browser anyway. The @capacitor packages are loaded and works in the browser like a charm (you need to make some adjustments in geolocation, for example, but works).You can add surely @capacitor packages to dependencies of the project, I don’t think that is a bad idea, but work more faster with that way.
Just for the record I solved it by pointing to src-capacitor this way: import { Geolocation } from “…/…/src-capacitor/node_modules/@capacitor/geolocation” import { Device } from ‘…/…/src-capacitor/node_modules/@capacitor/device’;
not sure if its the “right” way to do it though