Hi, I’m trying to develop my first firefox extension and I seem to be at a complete loss.
I’ve been trying to use Dexie anywhere in my extension for the past two days and finally found a way to get it running (bless open source projects) by downloading a version (dexie.js) and sourcing it from the background page. A background script, also sourced from the background page, will be using Dexie to process data received from a content script.
However, when loading the extension, the console gives the following warning: Content Security Policy:
The page’s settings blocked the loading of a resource at eval (“script-src”).
From what I’ve read, this is grounds for having the extension rejected from being submitted to addons.mozilla.org
Thankfully, on the Github page for Dexie, someone has already found a solution for preventing CSP violations: Dexis not CSP compliant · Issue #722 · dexie/Dexie.js · GitHub
However, the supplied solution involves using webpack to build the extension, which seems like a lot of work just to get the library functioning properly in an extension.
So would using webpack to build the extension be the only method to incorporate Dexie into an extension that’s AMO compliant?