Skip to content

Consider using root rescript.json if nearest one does not have a setting. #1072

Open
@fhammerschmidt

Description

@fhammerschmidt

If I have a monorepo:

.
├── common
│   ├── src
│   └── rescript.json
├── app
│   ├── src
│   └── rescript.json
└── rescript.json

and, in the root rescript.json, I set the suffix to something that is not the default, e.g.

{
  "package-specs": [
    {
      "module": "esmodule",
      "in-source": true,
      "suffix": ".res.mjs"
    }
  ],
}

the suffix resolution for opening the compiled JS file in both the common and app subprojects does not work, since the default is .js. One would need to add the suffix in the subproject's rescript.json as well.

The order of evaluation should be
local > root > default fallback

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions