opened
innovate-invent
username_0
Fixes #97
Merge configs using lodash merge
issue
created
kiaking
username_1
Thank you so much for the PR! Sorry but could we not use lodash? It adds to the bundle size quite a bit...
comment
created
innovate-invent
username_0
It imports the lodash submodule for that function only, is that still large?
comment
created
kiaking
username_1
Unfortunately yes... we had same problem at Vuex ORM Core. Lodash uses many common functions, so even if you import only specific features, it still loads unnecessary codes.

I really hate this too, but it's how JS libraries have to do things I guess...
comment
created
innovate-invent
username_0
I guess the code will have to be ripped out of the lodash library..
comment
created
kiaking
username_1
Yeah that's what I did when implementing `orderBy` feature at Vuex ORM Core. You could check this one out though.
https://github.com/vuex-orm/vuex-orm/blob/3c642728b829006a93ac1d1f9b33144d109ad606/src/support/Utils.ts#L214
comment
created
cuebit
username_2
Yea, lodash is a simple fix but adds considerable weight and a significant performance impact.

The clone example that @username_1 is referring to may point you in the right direction – it's quite verbose because performance is crucial for Vuex ORM – so it could easily be half the code. 

Note, the signature for type-safe merging is considerably more complex than cloning. If you wish to preserve types. Sometimes I abhor TS.
comment
created
cuebit
username_2
Closing due to inactivity. I don't believe there's been much steer on this topic to warrant this PR progressing.
comment