feat(dev): optional per-developer overrides via dev-local.yaml - #1804
feat(dev): optional per-developer overrides via dev-local.yaml#1804rjmunro wants to merge 5 commits into
Conversation
- Declare yaml as a root devDependency so scripts/run.mjs can load optional gitignored config without relying on transitive hoisting
- Load repo-root dev-local.yaml when present and apply per-process Node memory limits for TSC, Meteor, and Vite - Pass Vite --host when configured so the UI is reachable on the LAN
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Commit an annotated example for personal yarn-dev overrides - Gitignore dev-local.yaml so machine-specific copies stay local
- Describe copying the example file and available overrides in DEVELOPER.md - Mention the same in yarn-dev --help
0717cc5 to
46047f4
Compare
- Yarn was forwarding `vite ... -- --host`, so Vite ignored --host and stayed on localhost; LAN clients then got connection refused
|
This has overlap with the env file I have as part of #1786 One thing we are visibly disagreeing on is how the example file should work. I went with an approach of that the example should be documentation and shouldnt do anything until something is enabled. You have an approach of the env file being setup with some suggestions that someone may want to disable almost all of. I see it as an example file to me is a suggestion of how to setup your local env, so to me only things that we recommend be set should be set there. (In some projects I have seen it where they will auto-copy the example to a usable one for you if it doesnt exist) I like the simplicity of the envfile format, partly as it doesn't need a library to load, just invoking node with
Worth noting that this is no longer really used (although I appear to have missed a few references) |
|
We'll close this one for now, and keep the idea in mind for later (after the major de-Meteor-merge PRs) |
About the Contributor
This pull request is posted on behalf of SuperFly.tv.
Type of Contribution
This is a:
Feature / Documentation improvement
Current Behavior
Long
yarn devsessions can grow Node heaps unboundedly (especially TSC and Vite).Developers who want LAN access to the Vite UI also have to patch tracked config or run
Vite by hand. Personal tweaks were often kept in stashes or one-off
package.jsonedits that are easy to commit by mistake.
A uniform
NODE_OPTIONS/TOOL_NODE_FLAGSin the shell already works for a singleshared heap limit, but not for different per-process limits or Vite
--host.New Behavior
Optional gitignored
dev-local.yaml(same idea asmeteor-settings.json) is loaded byscripts/run.mjswhen present:--hostfor LAN accessCopy
dev-local.example.yaml→dev-local.yamland edit. Documented inDEVELOPER.mdand
yarn dev --help.yamlis declared as a rootdevDependencyso we do not rely on transitive hoisting.It was already present in the tree via
lint-staged— theyarn.lockdelta is asingle line adding it to the workspace dependency list (no new package resolution).
Testing
Affected areas
yarn dev/yarn startorchestration)dev-local.yamlis absentTime Frame
Not urgent — quality-of-life for local development; fine for the in-development release.
Other Information
Example:
Status