Switch to ESM-only (unblocks ESM-only use-editable)
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
- Ambito
- build-system, documentation
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", singleformat: 'esm'build intsdown.config.mts - Update
main/module/types/exportsto the ESM-only output - attw
esm-onlyprofile, 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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FormidableLabs/react-live
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
FormidableLabs/react-live#419 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
FormidableLabs/react-live#417 ·
-
bad syntax React.useEffect crashs the siteForse già presa @tunglambk l’ha presa 6 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
FormidableLabs/react-live#413 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
FormidableLabs/react-live#411 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
FormidableLabs/react-live#410 · 1 commento ·
Tutte le issue di FormidableLabs/react-live
Issue simili
-
bug priority: P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
wayfinder:task
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug customer-reported data-plane question Service Attention Storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
Azure/azure-rest-api-specs#47397 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensForse già presa @DavyMassoneto l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
diegosouzapw/OmniRoute#17109 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
paperclipai/paperclip#16785 ·
I maintainer di solito rispondono entro 1 giorno