Closed Xzya closed 8 years ago
Not really at the moment. The hot reloading server is great for working with UI aspects and logic that is not tied to Cordova functionality and plugins. Once your app is tied to those bits of functionality, it becomes a bit less useful.
We are working on ways that we might serve the correct Cordova.js for the platform, but it's not there yet.
How about loading cordova.js from the device directly when developing instead of <script src="cordova.js">
load it directly from the device. Then on production it can be changed to the former value.
I've had the same idea as @darkyen, however problem is that WebView denies access to cordova libary files: Not allowed to load local resource: file:///android_asset/www/cordova.js
.
I was hoping the cordova-plugin-file and setting <preference name="AndroidExtraFilesystems" value="assets" />
will allow access but didn't
ATM I've decided to work around this by starting separate HTTP server to serve files from /platforms/android/platform_www/
@piotr-cz did you make it work please?
cordova.js fails to load while running the app in development mode. The error I get is
Failed to load resource: the server responded with a status of 404 (Not Found) http://192.168.0.105:8080/cordova.js
obviously because the file is not on the server.
Is there any way to make it load cordova.js from the phone instead of the server?