3 ms·
As much as Git LFS is a bit of a pain, on recent projects I've resorted to committing my node_modules with Yarn 2 to Git using LFS and it works really well. No
by madjam002 5y ago
As much as Git LFS is a bit of a pain, on recent projects I've resorted to committing my node_modules with Yarn 2 to Git using LFS and it works really well.
Note that with Yarn 2 you're committing .tar.gz's of packages rather than the JS files themselves, so it lends itself quite well to LFS as there are a smaller number of large files.
https://yarnpkg.com/features/zero-installs#how-do-you-reach-this-zero-install-state-youre-advocating-for https://yarnpkg.com/features/zero-installs#how-do-you-reach-...
https://yarnpkg.com/features/zero-installs#is-it-different-from-just-checking-in-the-node_modules-folder https://yarnpkg.com/features/zero-installs#is-it-different-f...
- cerved 5y agowhy are you committing packages?
- hobofan 5y agoI would assume to prevent situations like the left-pad incident.
- cerved 5y agoPMs are made for managing and hosting packages, VCS are made for versioning source-code. If you're checking in packages into VC, you're going against the designs of both your PM and VCS. It's a bad idea. Don't. If you for some reason require redundancy of a package repo, then host your own.
- madjam002 5y agoBecause why not? It’s recommended in Yarn 2 and I don’t see there being any downsides with Git LFS as the files stores in Git are essentially pointers.
- devinrhode2 5y agoDoes yarn2 recommend also using LFS? Do you see any performance improvements when using LFS?