Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Switch to ESM-only (unblocks ESM-only use-editable)

Offen
#424 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv

Rechercherichtung

The build is configured in tsdown.config.mts, and the entry fields (main, module, types, exports) live in package.json. Read both to see how the CJS and ESM outputs are produced today, then check the docs for the Jest setup guidance. Done means one ESM build, with attw's esm-only profile and publint both passing, the docs noting the Jest options, and a major changeset added. Leave the use-editable dependency bump until that package has shipped.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Switch react-live to ESM-only (drop the CJS build). This is a major version.

Why

This unblocks making use-editable ESM-only. react-live's CJS build (dist/index.js) does require("use-editable"), so if use-editable went ESM-only first, react-live users running Jest (default CJS mode) would break with "Must use import to load ES Module". Tested with Jest 30.5. Node handles require() of ESM since 20.19 / 22.12, but Jest's module loader doesn't.

Scope

  • "type": "module", single format: 'esm' build in tsdown.config.mts
  • Update main / module / types / exports to the ESM-only output
  • attw esm-only profile, publint clean
  • Docs: note ESM-only and the Jest guidance (ESM mode or transformIgnorePatterns)
  • Changeset (major)

Then

Make use-editable ESM-only: "type": "module", a single ESM build, main → dist/use-editable.js, drop module and .es.js. No exports map needed: Node resolves an ESM main without one (verified, and attw esm-only passes). Bump react-live's use-editable dependency once that's released.

Vorherrschende Sprache
TypeScript
Sterne
4.6k
Forks
260
Ø Merge
17 Std. 25 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus FormidableLabs/react-live

Alle Issues in FormidableLabs/react-live

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.