With jpm, one now (from Firefox 38 on) has the possibility to use npm modules in Firefox Add-ons, cf. the documentation on MDN.
This appears to be restricted to the main entry file (index.js
by default), especially since require()
isn't defined in content scripts.
Is there any way of using npm modules in content scripts for Firefox-Addons?