Open web-padawan opened 3 years ago
I like it! Would we also be in a place to use this change as he switch to 1.0?
The first step would be to bump minimal Node.js version: #1647
Some PRs that also not directly related but need to be merged before 1.0:
Motivation
Once Node.js 16 becomes LTS, it will become a third LTS version with native ES modules support.
Some maintainers have already started migrating their packages to be pure ES modules. See the gist for an explanation of what it a pure ESM package.
In practice, it means that we drop support for CommonJS and drop support for older node versions (10.x).
Dependencies
Making
@web
packages pure ES modules would enable us to use dependencies that are pure ES modules too:cli-cursor@4
- #1641estree-walker@3
- #1241is-stream@3
- #1610globby@12
- #1583log-update@5
- #1728node-fetch@3.0.0
- #1661There might be other dependencies that get major bumps with dropping support for CommonJS in future.
Proposed solution
"exports"
field to remove"require"
entrypoints for all affected packages"type": "module"
topackage.json
to indicate packages are pure ES modules