0

I'm trying to build a firefox web-extension and I'd like to import another module (for code reuse) into the popup script. I've looked around and read that import might work, but eslint says its a reserved keyword.

I also read where someone recommended to import the second script straight onto the html page like so:

<script src="./js/utils/Listeners.js" type="module"></script>
<script src="./js/popup.js"></script>

I tried it just like this but didn't get anywhere. Also new to Javascript. Better at more traditionally OOP languages.

Is there a way to import a module into another using web-extensions?

ConductedForce
  • 194
  • 2
  • 14

1 Answers1

0

I've been able to solve the problem using jQuery to load scripts/modules, though further testing might be required.

credit to this question on loading jQuery into a firefox webextension.

ConductedForce
  • 194
  • 2
  • 14