React imports do not use relative paths with es6-global
jmezzacappa opened this issue · 2 comments
jmezzacappa commented
With "module": "es6-global" in my bsconfig.json, my imports look like this:
import * as React from "react";
import * as Js_exn from "../node_modules/rescript/lib/es6/js_exn.js";
import * as ReactDom from "react-dom";
import * as Belt_Option from "../node_modules/rescript/lib/es6/belt_Option.js";
import * as Caml_option from "../node_modules/rescript/lib/es6/caml_option.js";
import * as App$MyThing from "./App.mjs"which causes this error message in my browser console:
Uncaught TypeError: Failed to resolve module specifier "react". Relative references must start with either "/", "./", or "../".
jmezzacappa commented
Hm... I'm actually not sure if this is the right repo for this issue. I just found this: rescript-lang/rescript#2118
ryyppy commented
Yeah, this should be reported in the compiler. I will close this for now, feel free to reopen if you think it still belongs here.