Hi!
I had an unexpected error after upgrading the rescript compiler to v9.0.1 from v8.3.1. I found the error caused by missing export default in *.bs.js file. The configuration of bsconfig.json
is es6
. (My project is storybook with ReasonReact.)
bs-platform v8.3.1
export {
... ,
$$default ,
$$default as default,
}
bs-platform v9.0.1
export {
... ,
make ,
}
I’ve read Changes.md(https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md), but couldn’t find something related. But I found that I should add default
to export to JS.(https://rescript-lang.org/docs/manual/latest/import-from-export-to-js#export-an-es6-default-value)
I think that export default is needed along with ESM spec. I’m wondering why the exporting as default is not supported in the latest rescript compiler.
EDIT:
Totally my mistake. It is not caused by the difference of bs-platform version, but source codes like always Export default is not supported in latest rescript compiler