-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node_modules are added to npm release, adding 117MB #6
Comments
Thanks for trying @atao60/fse-cli. Short story. Nothing to be done on @atao60/fse-cli side. Long story short. Use Long story. Neither .npmignore nor .gitignore are used by @atao60/fse-cli to "describe(..) the entries to be included when your package is installed as a dependency". But package.json#files is, cf. npm docs - npm-package.json- files, i.e. here:
So to be clear, node_modules is not embedded in the package. But as stated by NPM docs - npm-install - Install a package, Then running
Now the strange thing. Running
but To avoid installing "extraneous" packages, you can use Or to remove them manually or with a dedicated script, in both cases based on the output of Then the size of node_modules/@atao60/fse-cli folder has shrunk to 40 Mo. Any other idea will be welcome. So I'll keep this issue open for some time. |
Reopening: will try with an embedded npm-shrinkwrap.json expunged from dev deps. |
🐞 Bug report
Description
the node_modules folder is unnecessarily added to the npm release of fse-cli, making up 117MB of the 118MB total package size. As a user of fse-cli, you certainly don't need eslint etc. packaged with this module.
🔬 Minimal Reproduction
run npm install fse-cli [--save-dev]
check size of node_modules/@atao60/fse-cli/node_modules
💻Your Environment
fse-cli Version:
0.0.29, also tested with 0.0.33
Comments
I'm not sure why this isn't ignored for the npm release, because you have
node_modules/
added to your.gitignore
, and according to this, npm releases should ignore all files in .gitignore (unless you have a .npmignore).Maybe try changing
node_modules/
tonode_modules
?In our project we have
node_modules/
andnode_modules/*
in the .gitignore.Maybe you need to use a module system like webpack? There, you can definitely exclude the node_modules folder, and only package (and minify) the sources and builds necessary for running your module.
The text was updated successfully, but these errors were encountered: