61 karma · joined April 14, 2009
Node will likely end up needing more than just an extension to disambiguate as well.
https://github.com/standard-things/esm
https://medium.com/web-on-the-edge/es-modules-in-node-today-...
The major bump means it's opt-in, so folks can continue to use the older version without breaking their workflow.
Every bit helps.
You can generally get smaller bundles using `lodash/xyz` modules over the `lodash.xyz` packages because of plugins like:
https://github.com/lodash/babel-plugin-lodash
https://github.com/lodash/lodash-webpack-plugin
Though in the future lodash-webpack-plugin may support `lodash.xyz` packages too.
Assuming the current setup of babel+webpack the difference between your naive version is just ~0.5 kB.
Babel works great without shims in modern enviros (I don't use shims in my projects).
It also offers modules inside the primary package now, e.g. require('lodash/chunk').
There's babel and webpack plugins to make cherry-picking and bundle size optimizations a breeze too.
More for avoiding guard scaffolding than for undefined behavior.
You'll need something like https://github.com/lodash/babel-plugin-lodash.