Skip to content

Using .npmignore with the PKG Bit extension #5022

Answered by davidfirst
cdalto asked this question in Help
Discussion options

You must be logged in to vote

@cdalto , I have added a few days ago an API to add records to a .npmignore file. You can use it from your env. e.g.

getNpmIgnore() {
  return ['*.composition.tsx'];
}

Regardless, it's something that you could do even before. Just write .npmignore file during an existing or new build-task.
If this didn't work for you, maybe you have files property in the package.json that whitelists the files to publish. In this case, as far as I know the .npmignore file is ignored.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davidfirst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants