Replies: 1 comment
-
Well for the docker dev issue I found a simple solution. Yarn link all packages at once
Then on next container start if symlinks are orphaned, unlink them all at once by package name
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd love some advice on using Yarn 4's
yarn link
.Context
Got a handful of nextjs frontend apps and a couple npm packages
90% of the time we can work on them individually (some folks native & some local docker dev)
Every now and then it's helpful to
yarn link
the npm packages.We have scripts that automate orchestration for docker devs
With Yarn 1 we could run
yarn link
and it would work smoothly.Now with Yarn 4 the
package.json
and theyarn.lock
files are affected byyarn link
and this has added some friction.Native Dev
With native developmentn
package.json
andyarn.lock
files are modified and not commit them to the git repoDocker Dev
With docker development it's even more difficult
yarn link
anything that shows up in there (it's nice)But when I bring down the containers and run them without the external volumes (don't want to yarn link)
yarn unlink
any symlinks that don't have an associated external volume / dist folderyarn unlink
fails because the symlink doesn't point to anything anymoreSo how do I make this easy
yarn install
package.json
andyarn.lock
file that have modificationspackage.json
andyarn.lock
, but that seems a bit heavy handedRequest for advice
Do native devs just have to deal with the modified committable files?
Is there a better way to do docker dev (we can't do a mono-repo)
could
yarn unlink
be a bit more flexible and just undo anything that it can instead of insisting on the symlink pointing to files?Beta Was this translation helpful? Give feedback.
All reactions