Closed avalanche1 closed 5 years ago
@avalanche1 you can use import '../node_modules/chrome-extension-async/chrome-extension-async.js'
or you can add a <script>
in background.html
or add it to the list in the background
section of the manifest.
Do you know a way to make import
work in chrome extensions?
@avalanche1 import
works fine in Chrome extensions, but this library is overwriting an existing API and so applies as a side effect.
import '../node_modules/chrome-extension-async/chrome-extension-async.js';
should work, have you had issues with it?
Thanks for the answer. Although I've decided to write extension files with typescript. So it handles all the imports for me now. Yay!
How can I use this awesome package in
background.js
file of an extension?