I couldn’t get this to work with Ionic 3.6.0 (not clever enough), but have got it working with 3.5.3 and the following:
“dependencies”:{
…
“cordova-plugin-sqlite-2”: “^1.0.4”,
“ionic-angular”: “3.5.3”,
“pouchdb”: “6.3.4”,
“pouchdb-adapter-cordova-sqlite”: “2.0.2”,
…
}
“devDependencies”: {
“@ionic/app-scripts”: “2.0.1”,
“@ionic/cli-plugin-cordova”: “1.4.0”,
“@ionic/cli-plugin-ionic-angular”: “1.3.1”,
“typescript”: “2.3.4”
},
I also switched back to version 3.5.0 of the Ionic CLI…
So. I didn’t need any of the websql plugins or individual pouchdb modules as per this topic, but probably the dev dependencies from that topic were the clincher. However, I’ll freely admit I have no idea what fixed what, what broke what or why. I suspect that it’s to do with the latest Ionic app-scripts version somehow.
I hope that later versions of PouchDB and Ionic start playing together (I’m sure they will), but in the meantime I’m OK sticking with Ionic 3.5.3 for this current project.