darkbasic / angularcli-meteor

13 stars 4 forks source link

Would it make sense to separate the client and server node_modules? #6

Open janKir opened 6 years ago

janKir commented 6 years ago

It's actually not an issue but more of an question. I'm wondering why server and client share the same packages.json and node_modules (in this repo and in the Meteor-IonicCLI tutorial etc). Besides a probably larger diskspace when having the same package twice, is there any reason to not seperating them? The server does not need e.g. all the Angular packages and there might also be some server only packages.

I tried separating both (which works fine for me) and I feel that meteor is now compiling faster, too, although, I have not really tested that.

Furthermore, I'm not sure which packages are needed only by client / server. Also, are there any Meteor packages that can be removed? For example, what about mobile-experience, standard-minifier-css and standard-minifier-js?

darkbasic commented 6 years ago

Yes, it makes completely sense and it's even advised to do so in production. The downside is that it will be harder to manage dependencies because you'll have Meteor in both the client and in the server and most athmosphere packages will require external deps.

janKir commented 6 years ago

Okay great! I'm still not sure which packages are needed in client / server only. Any hint?