Skip to content

Don't create .gitignore in pkg directory#1408

Open
mrothNET wants to merge 1 commit into
wasm-bindgen:masterfrom
mrothNET:master
Open

Don't create .gitignore in pkg directory#1408
mrothNET wants to merge 1 commit into
wasm-bindgen:masterfrom
mrothNET:master

Conversation

@mrothNET
Copy link
Copy Markdown

@mrothNET mrothNET commented Jul 6, 2024

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:

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

Changes made

Copy link
Copy Markdown

@rimutaka rimutaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I wonder why it hasn't been merged.

@satindra-r
Copy link
Copy Markdown

was looking for this, hope it gets merged soon

@BadMachine
Copy link
Copy Markdown

any progress?

@jefshe
Copy link
Copy Markdown

jefshe commented Jun 23, 2025

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

@Enduriel
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

6 participants