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

Support to load app via file:// on the phone would be useful. #540

Closed
gokul-hashlearn opened this issue May 1, 2017 · 6 comments
Closed

Comments

@gokul-hashlearn
Copy link

Currently, if a quasar app generated index.html + vendor.js is loaded via file:// on the phone, the cordova detection mentioned here (#485) kicks in and so the app fails to load, since cordova.js is not present.
If local loading of a quasar app via file:// is supported, then packaging a quasar JS app, that can be delivered via a webview, with a native webapp becomes possible. May be a switch to 'quasar build' or an env variable can prevent that cordova.js injection being done in the vendor.js file?

@rstoenescu
Copy link
Member

Will look on this after v0.14 release. Thanks and sorry the delay!

@janson
Copy link

janson commented Jun 9, 2017

To follow up, I've found this same issue on macOS desktop as well (Chrome 58, Safari 10, and Firefox 53).

Opening up the generated build's index.html via file:// results in cordova detection (#458) and the app fails to load.

@rstoenescu
Copy link
Member

@janson hi. can you be more specific on what you are doing? what do you mean by "opening up the generated build's index.html"? how are you opening it? what are you referring to by opening? You double click on index.html? Be as specific as you can, including tools etc etc. Thanks.

@rstoenescu
Copy link
Member

Hi, please reopen with the details needed by my previous comment. Thanks!

@glacjay
Copy link

glacjay commented Oct 19, 2017

@rstoenescu I encounter the same problem when I double click dist/index.html file to test. It shall be useful to load this statically on a phone with or without cordova.

@rstoenescu
Copy link
Member

You even get the warning when building:

 Build complete with "mat" theme in "/dist" folder.

 Built files are meant to be served over an HTTP server.
 Opening index.html over file:// won't work.

This is normal. "file://" protocol is not the same as "http://" or "https://". Every protocol has its security restrictions and way of working. Serve in a web server, or if you are building a cordova app use Quasar Play or build your app and run it on a mobile.

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

No branches or pull requests

4 participants