Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova Browser Platform Support #2312

Closed
imhoffd opened this issue May 17, 2017 · 5 comments
Closed

Cordova Browser Platform Support #2312

imhoffd opened this issue May 17, 2017 · 5 comments

Comments

@imhoffd
Copy link
Contributor

imhoffd commented May 17, 2017

Support for the "browser" platform of Cordova is lackluster in the CLI.

This issue is here as a placeholder to investigate supporting it. This may evolve into suggesting alternative workflows.

See:

@trakhimenok
Copy link

Please consider scenario where HTTPS is working via proxy (nginx).

I have scenario where I serve API and web app (browser platform) from the same domain over HTTPS.

Live reload does not work in this setup. It would be cool if it does.

@gischy
Copy link

gischy commented Nov 30, 2017

any idea when #2307 will be fixed, it is a pretty necessary functionality?

@bradrust
Copy link

@gischy, ionic cordova run browser -- --port=9009 seemed to work for me. Obviously there might be other CLI things that need review but this might help you based on #2307

@imhoffd
Copy link
Contributor Author

imhoffd commented Feb 14, 2018

Folks, I'm gonna call it. The Ionic CLI likely will not support the Cordova browser platform now or in the future. From what I can tell, it's a side project that doesn't get much support from the Cordova team and it has poor plugin support from the community. I'd be happy to look at submitted PRs, but the browser platform spins up a development server that is entirely separate from the one in ionic serve, which makes it difficult/infeasible to support for frameworks that ship their own dev servers with livereload, hot module replacement, etc.

As an alternative to using the Cordova browser platform, please use platform detection and ionic serve for developing for the browser. For stuff like camera, audio, storage, and other native functionality please see whatcanwebdo.today.

For Ionic Angular v4, the Ionic CLI inserts Cordova functionality only when building for Cordova. This means cordova.js is added to index.html during ionic cordova build, not ionic build. Additionally, all the Cordova JS files are copied into your project during ionic cordova build, not ionic build. This lets you easily target platforms such as Cordova or the browser with a single code base. Our story for this is not yet perfect, but it will be a major focus going forward.

@imhoffd imhoffd closed this as completed Feb 14, 2018
@ionic-team ionic-team locked and limited conversation to collaborators Mar 26, 2018
@imhoffd
Copy link
Contributor Author

imhoffd commented Mar 27, 2018

For those following this issue, I did create a feature idea for mobile apps (not mobile + desktop) using the Cordova browser platform and ionic serve for app development: #3043

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants