b3d9098383
### What? Updates create-next-app's templates' `.gitignore` files for parity with [Yarn's official recommendations](https://v3.yarnpkg.com/getting-started/qa#which-files-should-be-gitignored), accounting for Yarn's modern Plug-n-Play functionality. Fixes #65586 ### Why? New projects initialized with create-next-app presently add various extraneous files from the Yarn cache to the initial commit. This is most notable in the case of the Next SWC binary, which may exceed 100M in some environments and prevent users from pushing their new projects to free GitHub repositories without rewriting the commit history or setting up Git LFS. ### How? I've opted to follow the recommendations for non-[Zero-Install](https://yarnpkg.com/features/caching#zero-installs) configurations as Zero-Install may necessitate additional configuration and present additional complications for unsuspecting users, so I think it's best left up to the user to opt-in. Contrary to the example `.gitignore`s provided by Yarn, I've excluded the `.yarn/sdks` directory as it contains IDE-specific tooling which I think is also best left up to the user to opt-in to including. I have retained the current `.gitignore`'s exclusion of the `/.pnp` directory for backwards compatibility with older versions of Yarn. |
||
---|---|---|
.. | ||
js | ||
ts |