I have a question regarding importing, for example, join from lodash. As stated by this answerer, the way to go would be the following:
import join from 'lodash-es/join'
(File size of my dist/bundle.js after webpack --optimize-minimize
: 1K)
But I'd like to import only the join function from lodash-es/lodash.js. However, this does not seem to be possible.
lodash-es/lodash.js uses this to export the library:
export { default as add } from './add.js';
export { default as after } from './after.js';
export { default as ary } from './ary.js';
export { default as assign } from './assign.js';
I've already tried:
import join from 'lodash-es'
(File size: 133K)
import { join } from 'lodash-es'
(File size : 133K)
import { join } from 'lodash-es/lodash.js'
(File size : 133K)
Apparently none of these work since the entire lib is assigned to join
.
So how do I import only lodash/join
from the lodash.js-file without targeting the specific file?
I am using webpack 2.5.1 and lodash-es 4.17.4