kylekyle / monitoring

A simple, efficient, and lightweight ES module to monitor the DOM for when elements are added, removed, have appeared, have disappeared, or are resized.
17 stars 1 forks source link

Uncaught ReferenceError: monitoring is not defined #2

Closed CalvinWu4 closed 3 years ago

CalvinWu4 commented 3 years ago

I keep getting this error I am using a manifest.json to import the .mjs file into a content script

kylekyle commented 3 years ago

Can you share a bit of your code? Not sure I understand what you're trying to do.

CalvinWu4 commented 3 years ago

I want to know how to use this library with a manifest.json file which is used for making browser extensions

kylekyle commented 3 years ago

As far as I can tell, extension scripts don't support ES6 modules. I recommend using a bundler, like webpack, parcel, or rollup. Then you can build all of your dependencies - including monitoring - into your bundle and use that in your extension. Hope that helps!