Skip to content

refactor!: ship ESM-only builds#2544

Merged
joshuaellis merged 2 commits into
nextfrom
refactor/esm-only
Jun 17, 2026
Merged

refactor!: ship ESM-only builds#2544
joshuaellis merged 2 commits into
nextfrom
refactor/esm-only

Conversation

@joshuaellis

Copy link
Copy Markdown
Member

Summary

react-spring now ships ESM only. Every package emits a single modern ESM bundle (dist/<name>.modern.mjs) and its .d.mts types, replacing the previous dual CJS/ESM output.

Breaking changes

  • ESM consumers are unaffected — Vite, webpack 5, Next, esbuild, Bun, Deno, and native Node ESM already resolved modern.mjs.
  • CommonJS consumers must migrate to ESM, or run on Node ≥22.12 where require() of an ESM package is supported via interop.
  • Webpack 4 is no longer supported.

@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 97f5f79

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@react-spring/web Major
@react-spring/parallax Major
@react-spring/animated Major
@react-spring/core Major
@react-spring/mock-raf Major
@react-spring/rafz Major
@react-spring/shared Major
@react-spring/types Major
@react-spring/three Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@joshuaellis joshuaellis merged commit ddb4b02 into next Jun 17, 2026
20 checks passed
@joshuaellis joshuaellis deleted the refactor/esm-only branch June 17, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant