dmmulroy / create-melange-app

The fastest, friendliest, and most delightful way to get started with OCaml, ReasonML, and Melange, geared towards JavaScript and TypeScript developers
121 stars 20 forks source link

Fresh project with ESBuild fails to `dune build` #114

Closed smondet closed 3 weeks ago

smondet commented 2 months ago
 $ eval $(opam env)
 $ dune build
File "src/App.re", line 46, characters 17-24:
46 |         ~bundler=Esbuild,
                      ^^^^^^^
Error: This variant expression is expected to have type
         Cma_configuration.Bundler.t
       There is no constructor Esbuild within type Cma_configuration.Bundler.t

I tried opam pin add dune --dev and same result.

smondet commented 2 months ago

Noting that this fails when OCaml is chosen as the language (i.e. src/cma_configuration/bundler.ml is generated in ocaml but not App.re).

When choosing ReasonML as the syntax src/cma_configuration/bundler.re does have the Esbuild case.