-
Notifications
You must be signed in to change notification settings - Fork 469
Improving the interaction between bsconfig & package.json #4621
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
Comments
There are some trade offs to be made. |
Right, and i really would love us to follow typescript suite for everything related to developer ergonomics - Keep the bsconfig for BuckleScript configuration:
Stop doing anything else:
Would appreciate re-opening the issue as your answer didn't really address the pain point |
There is a ticket in the Typescript project asking for the same functionality. It is very easy to see what language a project is using without that file in the root. You also don't have to remove bsconfig.json, you can make it a hierarchy where it would look in package.json first, then for bsconfig.json for example. This is similar to what many javascript packages do it, allowing the development organisation the choice. The clear benefit is centralising all configuration into one file, for example in my existing js project, I have all config for linting, testing, transpiling etc. all in one place. |
package.json is a node.js specific feature, other platforms like deno, or tauri, do not use it. Having the compiler be tied to one platform and package manager seems like a bad decision thinking long term. There is probably something in between like reading package.json dependencies if none are specified in rescript.json, or maybe add a flag to rescript.json with target/platform or something like that, and when that is node, rely on package.json and complain if the rescript.json has dependencies instead. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey, following up the discussion here:
https://reasonml.chat/t/moving-bsconfig-to-package-json/2458/12
Opening this issue.
The problem
The theory
package.json should handle everything related to dependency management and packaging while bsconfig should handle compiler options(flags/errors/ppx etc).
The solution
Bonus points
rename bsconfig to rsconfig?
The text was updated successfully, but these errors were encountered: