wordpress-clients / hybrid

[I don't have time to work on this anymore. Use at your own risk] Build WordPress based PWA, iOS, Android & Windows phones apps in minutes!
MIT License
1.02k stars 351 forks source link

using ionic material with no errors on local host but not working on device #362

Closed Prabhat36 closed 7 years ago

Prabhat36 commented 7 years ago

hello @shprink i have successfully loaded ionic material into this app on localhots its works like charm everything is perfect no errors, but when i launch it on android device i get error saying "the connection to the server was unsuccessful. (file ///android_asset/www/index.html)"
i think the error is occurring because the ionic.css, ionic.material.min.css, style.css and ionic.material.min.js which i have loaded into index.html file,
screenshots of app localhost is attached,

I hope you can help me about these problems. Thanks

localhost with no error screenshot from 2017-07-26 23-21-02

my index.html file image index

shprink commented 7 years ago

I have no clue I am sorry. I have never used that lib. As it is not an issue of this project I will close.

Let me know if you make it work.

Prabhat36 commented 7 years ago

Ok thanks , i just need small help , can you please tell me how can i put my material scripts in head tag of index.html , because of the webpack plugin i have no idea that how you included all scripts in proper sequence, just give me one example how can i make it easy to place my own scripts in head section of index.html Hope you ll help me in this problem at least Thank you @shprink

shprink commented 7 years ago

You need to import it in you config index.js https://github.com/wordpress-clients/hybrid/blob/develop/dist/index.js:

import 'ionic-material/dist/js/ionic.material.min.js'

same for the CSS

Prabhat36 commented 7 years ago

thank you @shprink it worked, but only this file is not taking efferct import 'ionic/release/css/ionic.css'; should i need to import ionic.css file into any another file ? please help Thank you @shprink js

shprink commented 7 years ago

why do you need ionic/release/css/ionic.css ? Ionic CSS is already loaded in the app via Scss

Prabhat36 commented 7 years ago

image

dumpprod stuks on 37% , can you help me with this? @shprink

shprink commented 7 years ago

not sure I can help on that. Try to rollback your changes (git stash) then try again