Closed alexcroox closed 5 years ago
This is documented in the REAMDE, basically cordova-serve-ios does :
so hot reload is done by vue, try if your hot reload does work, without cordova, just by running
npm run serve
Yeah I was reading the README and the only mention of www coping outside production builds is during installation it seems? Does that mean first installation copies your assets across, and even if they are 4 months out of date, during serve the most up to date assets are always loaded from the active development server?
So my recommended course of action for now is to run npm run cordova-build-only-www-ios
and try serve again?
copying to cordova/www is only done during a build, otherwise your app is served by the dev server of vue cli...
cordova is just a webview, so just a browser, showing the dev webpage during serve... if hot reload is not working, make sure, your webview is showing the dev webpage, and not the files from www folder...
this plugin adapts the content of your config.xml therefore...
so during development it doesn't matter what's inside www folder, the folder can even be empty...
Thanks for the clarification. I'll have to check my config.xml as emptying out the www folder completely breaks the app for me so it must be trying to load from there.
Think I see the issue
<content src="index.html" />
<allow-navigation href="http://192.168.18.78:8080" />
I'm guessing somethings fallen out of sync as I seem to remember this plugin updating these values and then reverting them when the process is closed. I don't see any change to these during run now.
I've upgraded this plugin, could you let me know what my config.xml should be before I run any of your commands?
I believe:
<content src="index.html" />
<hook type="after_prepare" src="../node_modules/vue-cli-plugin-cordova/serve-config-hook.js" />
but I don't see a allow-navigation
tag being injected which your source seems to indicate would happen.
This is now working. I had to set
devServer: {
https: false
}
in vue.config.js
. I know you mentioned it in README, but not the workaround if you aren't ready for https locally.
https should work with cordova 8 or later
This is now working. I had to set
devServer: { https: false }
in
vue.config.js
. I know you mentioned it in README, but not the workaround if you aren't ready for https locally.
i do that and now works also for me!
I have an issue where my app isn't updating in response to changes I make in code. For example I add an extra character to a word but I don't see the change in the app. Even after quitting the app and re-running
vue-cli-service cordova-serve-ios
.So I tried clearing out
src-cordova/www/js
in case it was struggling to overwrite the files. However re-runningvue-cli-service cordova-serve-ios
doesn't seem to be copying over any files to www/js. At what stage is this supposed to happen?