Support option to not modify package.json
My package dosen't compile scss, repush the package lead to my main project recompile the package scss files all becasuse package.json changed.
Use yarn link instead of yarn add to create a node_modules symlink.
This avoids modifying package.json and copying packages to .yalc/**
Be aware, though, that using symlinks may lead to issues; specifically, running npm install will overwrite the linked project's dist folders. This means you would need to unlink the projects first (using yalc remove — I'm not certain about yalc retreat --all), then run npm install, and then link them back using yalc link.
Sorry for not being clear, the package.json I was referring to package's which i using yalc added, yalc will add yalcSig to it.
Ah, so you’re annoyed by this field.
I bet it was added intentionally to count as a file change that can trigger rebuilds/watchers.
As a solution, you could:
- Configure your watcher to ignore changes inside .yalc/**
- Use yalc/yarn/npm/pnpm link instead (symlink workflow)
But I’m also curious to hear the yalc author’s stance.
Yes, I was annoyed at this several days🤣.
yalcSig does not make sense, I don't find any usage in yalc source code, and It should not be used to trigger updates.
- I think it's right but I don't want to write configure in main project because there is a little coupling.
- yarn/npm link does not work because of dependency resolution problem
Thanks for your reply, i'm also want the yalc author’s stance.
I will fork it and remove related code about modify package.json if the author has no better way