Cordova.js as mock file

Hi,

I’ve created a cordova.js file with code to mock plugins to facilitate browser development.
Previously I was using my own grunt tasks and all the things were good.
I migrated to Ionic CLI (which has some nice feature) but the CLI (I think) inject an empty cordova.js file to prevent errors 404 in development.
Sadly to me, this new file overrides my own cordova.js and none of my mocks are avaiable :frowning:

Do you know a way to tell Ionic CLI to NOT inject cordova.js ?

Thanks

FYI : There is also Chrome Cordova : https://chrome.google.com/webstore/detail/cordova-mocks/iigcccneenmnplhhfhaeahiofeeeifpn

from @pbernasconi

Works great!

Didn’t know. Thank you !

But there is no much plugin supported (I should contribute when I have time).

Any solution to prevent cordova CLI to inject cordova.js ?

I don’t use Ionic serve myself because I don’t really like live reload generally. Other people love it though.

I generally use Fenix : http://fenixwebserver.com/

1 Like

hi, do you have use cordova file plugin? how to mock it?
I use file plugin and went to test it in Chrome, i have already install Chrome Cordova, but ionic can not fire ready event.
and can’t access the file.
if you have a solution about this, wish you can share it , thank you!

Hi @jetlongchen

did you eventually find a solution for this ?

Thanks

@jetlongchen I have the same question as @sebastianovide, did you manage to mock Cordova File?