melange-re.github.io
melange-re.github.io copied to clipboard
Document `@mel.config` and `--preamble`
Should @bs.config and --preamble have some documentation, especially since NextJS and RSC will require things like [@bs.config {flags: [|"--preamble", "\"use client\";"|]}];
Do you see this becoming an attribute? Something like [@mel.directive "use client"].
I imagine that could be the case if its usage ends up being more pervasive.
I've actually been working on a Next.js app with Melange and I must admit: writing the first [@mel.config {flags: [|"--preamble", "\"use client\";"|]}] was a bit annoying, but then when I had one I could just copy paste it to other pages.
I guess I can see both sides.
If you think it is worthwhile, and can point me in the right direction, then I could try writing it.