Skip to content

Latest commit

 

History

History

3-vite

3-vite


This project shows how to create a simple React app with Melange and ReasonReact.

The app just renders a component with "Hello world".


To set up the environment to work with it, you will need to install opam and Node.js.

Get started

$ cd example/3-vite
$ make init
$ make dev

Then open the browser to see the rendered app.

Commands

You can see all available commands by running make help or just make. Here are a few of the most useful ones:

  • make init: set up opam local switch and download OCaml, Melange and JavaScript dependencies
  • make install: install OCaml, Melange and JavaScript dependencies
  • make watch: watch for the filesystem and have Melange rebuild on every change
  • make dev: Run the application locally with vite and melange simultaneously
  • make bundle: creates a full bundle with the generated js files and html page