I am trying to build a simple Chrome extension that utilizes a few JS libraries. The directory structure is as follows:
cheerio(folder downloaded with npm)
axios.min.js
jquery.min.js
popup.html
test.js
As you can see, two of the three libraries I was able to locate a .min file for. However, Cheerio does not appear to have one, so I am trying to figure out how to get it to load in my extension.
I have tried to configure my popup.html as such, which does not work:
<html>
<script src="jquery.min.js"></script>
<script type="module" src="cheerio"></script>
<script src="axios.min.js"></script>
<body>
<h1>Header</h1>
</body>
<script src="test.js" type="module"></script>
</html>
And when I try to import cheerio from 'cheerio'
, I get a type error.
I am not using a content or background script in my manifest.json, just the action.default_popup.
Can I use web pack as a solution? Is there another way?