-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
require(esm)
has shipped in node and been backported without a flag all the way to node 20 (currently maintenance). I don't believe we're using top level await, so this should give us the ability to explore dropping the commonjs builds. Our packages are primarily targeted at the browser and consumers use a bundler(we should keep in mind SSR though).
There's a very small chance backwards compatibility is great enough via export { Foo as 'module.exports' }
for us to do this as semver-minor and ship it in v11. Otherwise we'll need to wait for v12.
The first task here is to make sure the codebase is fully esm. Then explore an esm-only build and test it against an array of projects to assess impact. The benefits for both consumers and maintainers need to be quantified - bundle size, reduced module duplication, build system simplification, etc.
Worth noting that node 18 has EOL and we could/should bump engines
to 20 before looking at this.
Resources
Metadata
Metadata
Assignees
Labels
Type
Projects
Status