Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Phonegap developer app not updating when making changes #7

Open
gopinath0332 opened this issue Aug 3, 2016 · 5 comments
Open

Phonegap developer app not updating when making changes #7

gopinath0332 opened this issue Aug 3, 2016 · 5 comments

Comments

@gopinath0332
Copy link

First i wanna thank for the template. I have been trying to do this setup for past 1 day and found out this template, really helpful.

Issue:
The issue is when i run template with "webpack -w | phonegap serve", change i make in Hello.js, it reflecting only in web browser and where as phonegap developer not is not updated.

Can you let me know how to update developer app with my changes ?

@devgeeks
Copy link
Contributor

devgeeks commented Aug 3, 2016

Yeah, sorry... that is a use case I am trying to find a solution for. I am working on a rewrite of the developer app and I am hoping we can come up with a way to support hot loading servers in it.

At the moment, it's not really supported :(

@devgeeks
Copy link
Contributor

devgeeks commented Aug 4, 2016

I take it ALL back.

@gopinath0332 I have figured out the problem! I was thinking after I posted that answer... "wait... why wouldn't that work?"

It seems it's a combination of a "bug" in the template causing the streaming of the project not to be able to update the app on the fly.

Try this:

In your index.html, change

<script type="text/javascript" src="./cordova.js"></script>

to

<script type=text/javascript" src="cordova.js"></script>

That should allow webpack -w to work.

@gopinath0332
Copy link
Author

Yes done that. After the change, web browser is not refreshing automatically.

I see you have committed the changes. So tried with new template also. still not working

@devgeeks
Copy link
Contributor

devgeeks commented Aug 4, 2016

Hrm. That is odd. It worked fine when I tested it. I'll reopen and do some more testing.

@devgeeks devgeeks reopened this Aug 4, 2016
@gopinath0332
Copy link
Author

I tried to do same setup. I achieved setup here. But there is one drawback, which is I couldnt use "require('react')". When i include , only browser is updating, where as phonegap developer app shows white screen.

I have work around for this issue.
Including react and react-dom js in index.html solves the issue. In this case, both browser and phonegap developer app updating

Can you help me on this issue ?

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

No branches or pull requests

2 participants