nathantsoi / vue-native-websocket

native websocket with vuex integration
943 stars 161 forks source link

dependence ~93MB #105

Open nailfor opened 4 years ago

nailfor commented 4 years ago

Our project uses more than 600 libraries, the largest of which bootstrap-vue takes about 25mb, the rest is much smaller, but the native web-coket takes up about 90MB of disk space because it includes the node_module and a huge number of library files, some of which are duplicated in our the system

Is there any way to fix this?

GopherJ commented 4 years ago

....

➜  client✗ du -sh node_modules/vue-native-websocket
628K    node_modules/vue-native-websocket
GopherJ commented 4 years ago

@nailfor please check why u got 90MB it's impossible....

GopherJ commented 4 years ago

Also please check twice before posting any issue

nailfor commented 4 years ago

Yes, I'Kant...

Im get clear debian system. Install latest nodeJs 13.10

nodejs -v

v13.10.1

mkdir testdir

cd testdir

npm install vue-native-websocket --save

du -sh node_modules/vue-native-websocket 99M node_modules/vue-native-websocket

but, what interesting, local home system give me another results: du -sh node_modules/vue-native-websocket 23M node_modules/vue-native-websocket

my home ~/.npm is not clear..

Ricaz commented 4 years ago

I have the same issue.

goeh commented 4 years ago

Same here (version 2.0.14).

vue-native-websocket $ du -sh *
4,0K    CHANGELOG.md
4,0K    PUBLISH.md
 12K    README.md
268K    dist
 95M    node_modules
260K    npm-shrinkwrap.json
276K    package.json
 12K    src
 24K    test
4,0K    webpack.config.js
OmgImAlexis commented 4 years ago

I have a feeling du isn’t following symlinks which makes the node_modules directory seem larger than it is.

OmgImAlexis commented 4 years ago

If you’re seeing extra files please provide more data to narrow this down.

Ricaz commented 4 years ago

What data do you want?

OmgImAlexis commented 4 years ago

Maybe try this tool https://www.npmjs.com/package/node-modules-size and show us the size of the node_modules subdirectories using du. Something like “du -hs * | sort -hr” in the node_modules directory.

adelriosantiago commented 4 years ago

The module is certainly a bit heavy on size. It must be devDependencies. Perhaps npm install --only=prod would help but I haven't tried.

mymmoonoa commented 4 years ago

same here. Screen Shot 2020-08-17 at 5 21 00 PM Screen Shot 2020-08-17 at 5 29 25 PM

The product build package size increase only 6KB after using vue-native-websocket. so this dev dependence size is acceptable to me.  Screenshot2020_08_17_180018