Phonegap compatible with ionic v3?


#1

I had done quite a lot of research throughout the internet, but seem like there’re totally no discussion about phonegap with ionic v3.
Currently ionic v3 provided lazy loading of pages and components, which make js file into seperate chunks. After i built the app using phonegap, all the chunk files except 0.js is not found. My question is, are there any highlighted configuration on config.xml or documentation for phonegap building i had missed out or acutally it’s not possible to do that with ionic v3?

ERROR Error: Uncaught (in promise): Error: Loading chunk 4 failed.
Error: Loading chunk 4 failed.
    at HTMLScriptElement.onScriptComplete (vendor.js?v=20170905T165653:104)
    at HTMLScriptElement.o (polyfills.js?v=20170905T165653:2)
    at t.invokeTask (polyfills.js?v=20170905T165653:3)
    at Object.onInvokeTask (vendor.js?v=20170905T165653:4648)
    at t.invokeTask (polyfills.js?v=20170905T165653:3)
    at r.runTask (polyfills.js?v=20170905T165653:3)
    at HTMLScriptElement.invoke (polyfills.js?v=20170905T165653:3)
    at HTMLScriptElement.onScriptComplete (vendor.js?v=20170905T165653:104)
    at HTMLScriptElement.o (polyfills.js?v=20170905T165653:2)
    at t.invokeTask (polyfills.js?v=20170905T165653:3)
    at Object.onInvokeTask (vendor.js?v=20170905T165653:4648)
    at t.invokeTask (polyfills.js?v=20170905T165653:3)
    at r.runTask (polyfills.js?v=20170905T165653:3)
    at HTMLScriptElement.invoke (polyfills.js?v=20170905T165653:3)
    at c (polyfills.js?v=20170905T165653:3)
    at Object.reject (polyfills.js?v=20170905T165653:3)
    at NavControllerBase._fireError (vendor.js?v=20170905T165653:54656)
    at NavControllerBase._failed (vendor.js?v=20170905T165653:54644)
    at vendor.js?v=20170905T165653:54699
    at t.invoke (polyfills.js?v=20170905T165653:3)
    at Object.onInvoke (vendor.js?v=20170905T165653:4657)
    at t.invoke (polyfills.js?v=20170905T165653:3)
    at r.run (polyfills.js?v=20170905T165653:3)
    at polyfills.js?v=20170905T165653:3

#2

What exactly do you mean with “Phonegap”?`

Ionic uses Cordova to build its native apps.
Phonegap is a commercial distribution of Cordova (same thing and code, just different name). Phonegap is not integrated with Ionic.
There is also Phonegap Build, which is a service to build native apps (Phonegap and Cordova) similar to Ionic Package.


#3

Did you find any solution for this problem? I am facing the same problem.


#4

Hi,
I’ve not been around the Programming world for like a year now but I’ve basically caught back up with the scene.

Before I left I was studying all this too and actually turned to my mentor for any doubtful questions I had where he explained some basic keys of the three systems and their uses to me.

Like said, it’s been like a year or more. So, basically he explained PhoneGap is basically an older version of Cordova as was mentioned above it’s the commercial distribution just basically like a legacy version of Cordova.

Ionic V4 is suppose to be a full blown support structure for Lazy Loading concepts so if Ionic isn’t supporting it now, they will in the future.

I’d prefer you stick to Cordova and Ionic as they’re the most up-to-date and PhoneGap is basically just built to help emulate our services which Ionic and Cordova are already achieving. I also have the PhoneGap Emulator on my PC and I find it’s very helpful for quickly launching any app I need served quickly.

I hope this was helpful. :+1:t2: