Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#424 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
nodejs, react, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
4.6k
Fork
260
Merge medio
17h 25m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FormidableLabs/react-live

Tutte le issue di FormidableLabs/react-live

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.