digitalevidencetoolkit / deptoolkit

The Toolkit API, app, and browser extension. Start preserving now.

Home Page:https://digitalevidencetoolkit.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve SingleFile import

basilesimon opened this issue · comments

Right now we're following procedure recommended by SingleFile to accomplish this.

The result, however, is a considerable skew given that the SingleFile code, which we understand and intend to use as a module, is included in the repo as if it were ours.

Maybe this is a question best asked to @gildas-lormeau, actually 👋

Is there a better way, which is more akin to a module for us and avoids us shipping your code?

Thank you so much for your help

I agree that I should improve my procedure. The things that I don't like is the fact that the dist folder is hard-coded and there should be only 5 built files (2 content scripts, 1 background script and 2 web accessible resources). I don't think there is an easy way to provide this code as a module or something similar though because of the manifest.json file which must include the paths to these files.

Hey, thanks so much for looking into this.

Would it be possible to... load these files from the internet, kind of like what unpkg.com do?

I wouldn't recommend to retrieve the files from unpkg.com because browser vendors want to ensure extensions don't contain remotely hosted code, see https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/#remotely-hosted-code and https://bugzilla.mozilla.org/show_bug.cgi?id=1594234.