Skip to content

V6 Roadmap: ESM Only distribution #2363

Closed

Description

@timofei-iatsenko

The JavaScript ecosystem keeps moving forward, and more and more projects are switching to ESM-only distribution.

I’ve tried to make this change a few times already, but each time I was blocked by various incompatibilities. LinguiJS is a complex project consisting of multiple parts — runtime, CLI, and plugins for different tools.

Switching to ESM-only requires ensuring interoperability across all these tools. The main roadblock was usually supporting ESM in the babel-plugin-macros. I even contributed to Babel itself babel/babel#16860 to make this possible in the future.

However, the babel-plugin-macros codebase is quite outdated, and before working on the original issue, a lot of maintenance work was needed just to bring everything up to date. Because of that, I had to postpone this task for a long time.

Fortunately, the ecosystem has evolved, and with recent Node.js improvements — such as require(esm) backported to Node.js 20 — this workaround is no longer necessary. That means we can now distribute LinguiJS as pure ESM.

I expect no major changes will be required from users unless they rely on very specific or non-standard setups. Still, since this is a significant shift, it should be released as a new major version, similar to what Storybook 10 did.

I don’t plan to include any other major changes in this release — this breaking change will be big enough on its own.

Testing checklist:

  • Ensure support for webpack
  • Ensure support for babel-plugin-macros
  • Ensure support for metro

Bump minimal nodejs version requirement to 20.16+, 22.19+, or 24+

Blockers:

Another fixes to be included in the V6 release

To do List:

Bump previously blocked by ESM deps (nice to have, but not blocker)

Remove deprecations:

Post-release

  • spike: implement NX for better DX and package build/test orchestration
  • Try to enable windows tests
  • Set up Dependabot updates

Activity

  1. added this to the v6 milestone on Jan 29, 2026
  2. locked and limited conversation to collaborators on Feb 13, 2026
  3. converted this issue into a discussion #2455 on Feb 13, 2026
  4. unpinned this issue on Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions