- Gatsby uses filenames to generate urls and look up special pages like custom error pages. BuckleScript unfortunately does not support as wide a range of filenames due to filenames being used to generate module names. For the porting of this project specifically the consequences are:
- Since
404.re
is not valid, the code for the custom error page has been put inerror404.re
and a404.js
that simply re-exportserror404
has been aded as a bridge. - Dashes aren't valid in filenames, so
page-2.re
has been renamed topage_2.re
, which of course causes the generated url to use an underscore instead of a dash too. - Filenames must be unique across the project, which heavily restricts possible URLs. In particular, only being able to have one
index.re
is causing significant problems. The solution currently used is to rename the file to something unique, e.g.layouts_index.re
, then add anindex.js
that re-exports it.
- Since
- Integrate bs compilation into gatsby build process (probably via a plugin similar to https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-typescript)
- Add support for writing plugins, gatsby-config.js, gatsby-node.js etc. in Reason
- Find or make some graphql bindings
- Add bindings for the more common gatsby plugins, remark, glamor etc.