-
In my previous post on trying to use the NextJS App Router and Reason I described some of the problems and limitations of their compatibility with one another. With the release of Melange 2 I decided to see if the new features of Melange 2 could help to increase the compatibility of Reason and the NextJS App Router. I have also documented some of the things learnt after trying Melange (v1) with Astro and Remix.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
We can then tell Netlify the location of our functions (./reason_netlify_functions_output/reason_netlify_functions) in a netlify.toml file. See this basic Astro, Reason and Netlify application for an example.
-
And the app should work perfectly with the NextJS dev tooling. See this basic NextJS App Router, Reason and Melange 2 application for an example.
-
Dune will allow some special characters in folder names but it does not allow them in file names (in my limited experience). Remix uses file name based routing and the file names can have special characters in them, e.g., concerts.$city.js. When a file name with special characters in it fails to compile we can use a Dune rule stanza to create an output JS file with special characters in it:
-
In the above dune file we add concerts_city.js to the melange.runtime_deps - this is the output JS file name created from the Reason source code file concerts_city.re. In the rule stanza we set the target as the special character containing file name we want and the dependency (deps) as the path to concerts_city.js in the _build folder. The rule then copies concerts_city.js to concerts.$city.js, which should then work perfectly in a Remix application. Here is a broken and unfinished Remix app that may be of some limited use.