Open willdurand opened 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.
One thing we'll have to find out is how the l10n extraction will be performed.. It's using webpack currently, which we removed in other projects that got converted to ESM recently.
Note: this is an issue for the addons-linter code itself and not about web extension features. AMO and FF already support ES modules in web extensions/add-ons.
More and more dependencies are going to be "pure ESM" packages in the near future because the support in most maintained Node versions is built-in and ESM is a much better fit than CommonJS. The following Node.js versions are able to load ES modules without any specific flags:
12.20
,14.14
, or16.0
.From: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
From: https://blog.sindresorhus.com/hello-modules-d1010b4e777b
We should consider switching to ESM in the near future as well and this issue is about planning for that. It's recommended to switch to pure ESM rather than trying to package ESM + CommonJS within a same package (and that seems a bit simpler). This will also be a good time to refresh our Babel/Webpack configs.
┆Issue is synchronized with this Jira Task