wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

Don't create .gitignore in pkg directory

Open mrothNET opened this issue 1 year ago • 4 comments

Closes #728 Closes #984, Closes #909 Closes #999. Supersedes #1131, #985

Problematic Behaviour

Currently, wasm-pack generates a .gitignore file in the pkg directory during each build.

Suggested Solution

This PR proposes removing the automatic creation of the .gitignore file without introducing a replacement.

Justification

While many tools generate an appropriate .gitignore during project initialization, it’s relatively uncommon (in my experience) for build tools, like compilers, to create .gitignore files during a build.

Moreover, this behavior has led to several issues, as outlined in the following requests:

  • #728
  • #984
  • #909
  • #999

This PR aims to remove the generation of the problematic .gitignore file, addressing and potentially superseding these other PRs:

  • #1131
  • #985

Changes made

mrothNET avatar Jul 06 '24 10:07 mrothNET

was looking for this, hope it gets merged soon

satindra-r avatar Jun 06 '25 09:06 satindra-r

any progress?

BadMachine avatar Jun 08 '25 11:06 BadMachine

bumping! it seems very strange that this is on by default as it's very easy for a dev to add it themselves and causes issues when we want to version control the autogenerated type files

jefshe avatar Jun 23 '25 13:06 jefshe

Would be really nice to see get added, with --no-pack being a thing it's rather annoying to have a custom package.json to then have it get gitignored because of running a wasm-pack build.

Enduriel avatar Aug 20 '25 16:08 Enduriel