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

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

Open
fhammerschmidt opened this issue Feb 10, 2025 · 0 comments

Comments

@fhammerschmidt
Copy link
Member

fhammerschmidt commented Feb 10, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant