Not working on a chrome extension build using webpack
Opened this issue · 1 comments
I am building a chrome extension which stores data on pouchDB and syncs it with CouchDB. For pouchDB GUI, I have installed Pouchdb-Inspector (chrome-extension) from chrome web store.
While inspecting PouchDB option on chrome's developer tool of background page of the extension I am building, the database info is not shown. Pouchdb-Inspector only shows some templates without any data or options. It seems that inspector is not able to run any js scripts.
Following is the settings in my background.js file:
let PouchDB = require('pouchdb');
if(typeof window != null) window["PouchDB"] = PouchDB;
Where am I getting wrong? Do I need to do some additional configuration settings on webpack for Pouchdb-Inspector to work fine?
for posterity: https://stackoverflow.com/a/46559775/884640
I know it's not the same thing, but if you use WebSQL or IndexedDB, You can use normal developer tools provided by Chrome, going to Application/Storage and then look at data in your DB. It is also explained in the official PouchDB documentation at https://pouchdb.com/guides/databases.html