Closed swey closed 7 years ago
Would it make sense to use the same syntax for https://github.com/unic/estatico/blob/edee846916e696ccb7ff1a03972da9d35ff189ba/source/assets/js/helpers/events.js#L2 and remove the explicit dependencies on lodash.XY
?
@backflip Yes, removing two npm packages and use the main lodash package for all things is a very good idea 👍
Shouldn't we be having lodash declared then as a dependency? I see it is declared as a dev dependency, but it is also used in the client side, so I'd expect to have it declared in the "dependencies" section in package.json
. Or am I wrong @swey @backflip @marbor3 ?
The lodash functionality still will be included in the main.js like every other library. The only change in this PR is that we don't fully include lodash anymore. So I don't see a reason to move the dependency.
replaced the full import of lodash with the import of 2 single functions (reduces the file size a lot)
-> saves around 75kb minified (around 25kb gzipped)