Closed GreenFootballs closed 3 years ago
Oh, and at the risk of pointing out the obvious: you can of course just use a bundler like rollup.js.
Thanks, I got it to work! I was having lots of trouble trying to use dynamic import with the code as is, but rollup.js was the magic I needed. This is the command line I used to generate the bundle:
rollup ./src/index.js --file ./bundle/nativefs.js --inlineDynamicImports
Thanks for reporting back on your success! Happy you got this working for you!
Hi, this is a great little library, but since it uses import to do its thing, it's difficult if not impossible to use in a Chrome extension (which I'm currently developing), because there's no way to set the file type to 'module' in the extension manifest. This needs to run in the content script, and injecting a script tag into the DOM has some big limitations.
Is there any way to use the current code in an extension, or could parts of it be extracted to work as simple functions in a standard JS file?