question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow use capacitor package in web

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:23 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
Nisgrakcommented, Dec 1, 2020

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.

0reactions
renzocastillocommented, Nov 11, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found