Relative URLs for assets don't resolve to chcp external directory
EddieCanales opened this issue · comments
When I use relative resources in my index.html like <link rel="stylesheet" href="css/app.css"/>
, they don't seem to resolve to the full path of the currently installed version of the app.
The webview throws the following error:
file:///css/app.css Failed to load resource: net::ERR_FILE_NOT_FOUND
It is trying to pull it from the root level of the file system instead of something more like this:
file:///data/user/0/com.myapp.package/files/cordova-hot-code-push-plugin/2016.06.13-14.48.41/www/css/app.css
The manifest seems to be correct. It looks like this:
{
"file": "css/app.css",
"hash": "ecbc7d3f4b5d7ea39a72801d05987907"
},
I'm on OSX and I'm currently testing on android with cordova-hot-code-push-cli@1.1.1 and cordova@6.2.0.
Have you seen this issue before? Thanks for any help you can offer.
That's weird. Never encountered that kind of error :(
Can you somehow give me a step-by-step guide on how to reproduce it? Because if I ran the default Cordova project - the paths for css and js are the relative ones, and it works fine.
Also, as I understand that's an issue with the main plugin, not the CLI client. If so - please, move this issue to the https://github.com/nordnet/cordova-hot-code-push/issues .
Finally figured out what the issue was. It turned out to be an issue with my build process that wasn't injecting the cordova.js file into my app. Sorry for making you spend your time on this.
No problem, good that you solved it :)