Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with-reasonml example: better setup #4218

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

rase-
Copy link
Contributor

@rase- rase- commented Apr 27, 2018

With this setup we're compiling the .re/.ml files directly to source directories with a .bs.js extension, and enabling next.js to pick up that extension for pages.

This has multiple advantages:

  • We can re-enable the bs watcher to hot reload components and pages in dev mode when the .re/.ml files are changed
  • Use this setup to include ReasonML to existing next.js projects, since pages and components can be either JS or ReasonML, and they will both work with this setup
  • Doesn't rely on bs-loader which is deprecated, and follows the officially recommended setup with in-source

With this setup we're compiling the .re/.ml files directly to source
directories with a .bs.js extension, and enabling next.js to pick up
that extension for pages.
@timneutkens
Copy link
Member

Nice!

@timneutkens timneutkens merged commit 6158243 into vercel:canary Apr 27, 2018
lependu pushed a commit to lependu/next.js that referenced this pull request Jun 19, 2018
With this setup we're compiling the .re/.ml files directly to source
directories with a .bs.js extension, and enabling next.js to pick up
that extension for pages.
@lock lock bot locked as resolved and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants