Has anyone successfully integrated PouchDB / vue-pouch-db into a Vue.js application before? I encountered an error when attempting to define the PouchDB database.
Here are the definitions I tried:
import PouchDB from 'pouchDB'
or
import PouchDB from 'vue-pouch-db'
or
const PouchDB = require('vue-pouch-db')
const db = new PouchDB('database_name')
or
const db = PouchDB('database_name')
None of these methods worked for me.
Errors encountered:
- when declaring new PouchDB = > PouchDB is not a constructor
- when declaring PouchDB = > PouchDB is not a function
What is the correct way to initialize PouchDB in Vue.js ?? Thank you in advance!