Here is what I have in node_modules
when I install my package:
Even though I am using this files
field in package.json:
"files": [
"./dist"
]
Why is that?
Here is what I have in node_modules
when I install my package:
Even though I am using this files
field in package.json:
"files": [
"./dist"
]
Why is that?
Maybe you misunderstood what the files
field does:
The files
field is used to define files that should be imported alongside your library when another project install your project as a npm package.
Thats how module works.if you don't like node_modules folder try Yarn2 . Same thing.but different module folder name.
Thats how npm works. All yours external dependencies will be downloaded to node_modules.