rescript-lang / rescript-lang/rescript
Provided `jsx.module` in root `rescript.json` does not work
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- OCaml
- Sterne
- 7.5k
- Forks
- 485
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 55
Beschreibung
In monorepo, I define this in the root rescript.json:
"jsx": {
"version": 4,
"module": "JSXExt"
}
It works for local packages, but it fails to compile with the following errors from @rescript/react dependency:
Log
❯ Building ReScript packages: $ pnpm rescript build [@ Draftist]
[1/3] 🧹 Cleaned previous build due to compiler update
[1/3] 🧹 Cleaned 0/0 in 0.43s
[2/3] 🧱 Parsed 873 source files in 5.05s
[3/3] ❌ Compiled 156 modules in 0.73s
We've found a bug for you!
/Users/Alex/Dev/Draftist/node_modules/@rescript/react/src/RescriptReactErrorBoundary.res:40:1-44:36
38 │ `)
39 │
40 │ @react.component @val
41 │ external make: (
42 │ ~children: React.element,
43 │ ~fallback: params<'error> => React.element,
44 │ ) => React.element = "ErrorBoundary"
45 │
The module or file JSXExt can't be found.
- If it's a third-party dependency:
- Did you add it to the "dependencies" or "dev-dependencies" in rescript.json?
- Did you include the file's directory to the "sources" in rescript.json?
We've found a bug for you!
/Users/Alex/Dev/Draftist/node_modules/@rescript/react/src/RescriptReactErrorBoundary.resi:13:1-14:97
11 │ }
12 │
13 │ @react.component
14 │ let make: (~children: React.element, ~fallback: params<'error> => React
│ .element) => React.element
15 │
The module or file JSXExt can't be found.
- If it's a third-party dependency:
- Did you add it to the "dependencies" or "dev-dependencies" in rescript.json?
- Did you include the file's directory to the "sources" in rescript.json?
Setting jsx config in package's rescript.json does not work - compiler ignores it.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere den Fehler mit den root- und package-rescript.json-Dateien, pnpm rescript build und den @rescript/react-Dateien RescriptReactErrorBoundary.res und .resi. Verfolge, wie jsx.module im Compiler gelesen und weitergegeben wird; abgeschlossen ist die Aufgabe, wenn die root-Einstellung für Quellcode von Abhängigkeiten funktioniert und die Konfiguration auf Paketebene konsistent behandelt wird, ohne die JSXExt-Fehler.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100