rescript-lang / create-rescript-app

npm create rescript-app@latest
https://www.npmjs.com/package/create-rescript-app
56 stars 8 forks source link

Basic template: rescript.json contains "module": "esmodule" and "suffix": ".res.js" #60

Closed nfgrusk closed 5 months ago

nfgrusk commented 5 months ago

When using create-rescript-app 1.7.1 (and picking the basic template + ReScript 11.1.1 + ReScript 1.4.0), the rescript.json file created for a new project looks like this:

{
  // …
  "package-specs": {
    "module": "esmodule",
    "in-source": true
  },
  "suffix": ".res.js",
  // …
}

Thus, building the project and running node src/Demo.res.js will lead to Node.js complaining about a syntax error (“Unexpected token 'export'”).