cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
loynoir
New member
Status: New idea

# feat

Enable consuming of ES modules in content scripts and userscripts

## what changed

Basic assumption of JS library format have changed.

Many years ago, it's OK to assume dependency JS library is written in global IIFE.

Since 2021, famous dev like sindresorhus already migrated to ESM.

Now, popular library I known are written in ESM.

Now, I think, basic assumption of JS library format have changed from global IIFE to ESM.

## problem

I feature request userscript engines to migrate toward ESM.

But quote https://github.com/violentmonkey/violentmonkey/issues/2528#issuecomment-4500936394

> browsers don't support modules in extension's content scripts or userscripts

Seems like content scripts or userscripts still lack of ESM support, yet.

## related downstream

https://github.com/greasemonkey/greasemonkey/issues/3229

https://github.com/Tampermonkey/tampermonkey/issues/2791

https://github.com/violentmonkey/violentmonkey/issues/2528

1 Comment
Status changed to: New idea
Jon
Community Manager
Community Manager

Thanks for submitting an idea to the Mozilla Connect community! Your idea is now open to votes (aka kudos) and comments.