npm pack doesn't include all files in the package

2.2k Views Asked by At

I run npm pack inside dist folder, but it doesn't include all it's files. it just contains: package.json, ReADME.md, index.js (main).

there is no .gitignore file, and I tried to create an empty .npmignore file, but it didn't help.

I also tried to add files array to package.json.

all files in the root or subfolders (js or other files) don't included in the pack file.

1

There are 1 best solutions below

1
On

I found another files property in my package.json, so adding another one has no effect, also .gitignore and .npmignore have no effect.