Whenever a ReScript file is compiled, the generated JS output always has
// Generated by ReScript, PLEASE EDIT WITH CARE
But on the official website https://rescript-lang.org/ it says the ReScript is very easy to unadopt i.e. if we adopt ReScript and change our minds half way, we could still keep the generated JS files and it will continue to function. But then obviously, we would have to edit the generated JS files in one or the other situation to continue building the product/app whatever.
I feel this contradicts the output comment above. I mean if ReScript really leans on clean JS output, maybe the comment is not needed ?
But then obviously, we would have to edit the generated JS files in one or the other situation to continue building the product/app whatever.
Editing the generated JS file is an escape hatch. It could be useful when you need a bug fix to make immediately. You should edit it with care otherwise when rescript file changes are changed, those changes are lost
As long as you are using ReScript, you shouldn’t hand-edit the output JS files (unless you have absolutely no other option and urgently need to change something in it, in which case you should set up a script that does the edit every time the file is output by ReScript, otherwise the changes will disappear the next time it is).