Skip to content

Import lodash per method to reduce bundle size #1

@igadmile

Description

@igadmile

Is it possible to import lodash methods one by one?

This:

import assign from 'lodash/assign';
import isArray from 'lodash/isArray';
import mapValues from 'lodash/mapValues'
import merge from 'lodash/merge'

instead of:

import { assign, isArray, mapValues, merge } from 'lodash';

This would only import required modules into bundle instead of whole lodash when using bundlers like webpack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions