I'm creating an app with Ionic 2 that runs as a website in a browser and as an app on iOS and Android. It uses the SQLite plugin when on mobile devices. The issue I'm having is the SQLite plugin has to import ionic-native stuff, which when running as a website throws an error because ionic-native is only on cordova devices. How do I get around this?
The import that is causing the error:
import { SQLite, SQLiteObject } from '@ionic-native/sqlite';
and the error that is thrown:
Cannot find module "@ionic-native/core"