-
Notifications
You must be signed in to change notification settings - Fork 10
Auto-generate pages directory #140
Comments
resource tutorials.js - this is a special case that will need slightly more thought when approaching this issue. |
The following is an issue tracking the upstream changes needed in the ReScript compiler to obviate needing to generate this boilerplate: rescript-lang/rescript#4874 |
|
Similarly, for pages that use a pattern like |
The implementation of this task may introduce a wrapper around next dev and next build, so that it can always perform actions before the build |
We can get this by using a module signature, though we might then want a linter to assure that all pages do constrain themselves to the right signature. |
I may have come up with a suitable workaround for this issue. I propose we forgo this task if Ashish accepts my workaround approach. Here is the essence of the approach:
|
I am closing this issue for now. Please reopen if the approach noted above is not acceptable. |
I may have declared victory too early. I tried using |
That would be sad! |
I thought about this more. The way that the url's currently work probably only results in one page called Index.res. For any subpaths like |
We have to implement our pages in a directory called
res_pages/
due to ReScript naming conflicts with having multiple files namedIndex.res
, but eventually NextJS requires apages/
directory. Currently we manually write a file inpages/
with some boilerplate, which points to the corresponding file inres_pages/
. It should be possible to fully auto-generate thepages/
directory.The text was updated successfully, but these errors were encountered: