This will watch a Chrome extension's file directory, compile a hash based on the file names and date and reload the extension/add-on when the directory undergoes changes.
Compatible with Webpack and any other type of build setup! π¦
Add the script to your extension's manifest.json
"background": ["reloader.js", "background.js"]
You're all set!
Currently doesn't work in Firefox because of a WON'T FIX for the getPackageDirectoryEntry
method π (in their own words, Firefox add-ons do not have a directory - smh)
Disclaimer #2: Mozilla's web-ext run
seems like a better tool for this π―