Hi all,
This is a bug fix release for 9.0. @rescript/std is also scheduled a release for 9.0.1.
Following the feedback from release 9.0, we did some research and make some changes to make both NodeJS and React Native users happy.
The standard library is still shipped with .js instead of .mjs extesion, but it is added with a separate package.json to annotate that it is es6 modules, so Node can resolve it happily. For NodeJS es6 module users, you don’t need transpiling. Hopefully this should not break ReactNative metro bundle users.
Hi,
v8 -> v9.0.0
We changed the suffix of es6 inside stdlib from .js into .mjs, so that Node can run it natively without transpiling, this turns out to break some existing tooling.
v9.0.0 -> v9.0.1
We reverted such changes, and found another solution (by adding lib/es6/package.json with module : type) to make it run natively under Node without transpiling, so we achieved our goal without breaking existing toolings.
In that case, v9.0.0 is a temporary release (deprecated using npm deprecate)
So for the js suffix inside bs-platform, we will stick the .js extension for a while until most tools in the js community is ready.
About the suffix on user land, it is up to your preference. Personally, I like .mjs which is explicit while .js you have to do some random guess or look up external files