Yesterday I deployed a new compiler bundle (email@example.com), which changed its global entry point name from
rescript_compiler, so if you already loaded the old playground version and you visit the new playground today, you will eventually end up with following error in your console:
can't find variable rescript_compiler, or
can't find variable bs_platform, depending on the caches you hit for either the playground UI, or the compiler bundle)
To fix this issue, just clear the browser cache for
rescript-lang.org and it should reload all resources correctly. This was an exceptional change; usually we don’t change the global entry point name of the compiler JS bundle. In the future we will also make sure that we will do an additional existence check on the compiler entry point to prevent any crashes.
On a good note: The new playground bundle now ships with updated ReasonReact compile artifacts, so from now on, code like
React.useState(_ => 1) will actually compile instead of failing with a weird build artifact error message.
Sorry for the inconvenience!