Decrease a number of imported code from lodash
estambakio-sc opened this issue · comments
Egor Stambakio commented
Meta-Info | Value |
---|---|
ExtProjectId | JCCMMN-01 |
Original Estimation | 1h |
Remaining Estimation | 0h |
In order to decrease a size of bundle we need to rewrite import
statements where lodash
is used.
Currently imports look like this :
import { cloneDeep } from 'lodash-es';
Desired state:
import cloneDeep from 'lodash/cloneDeep';
Rationale:
we bundle code with webpack
and get internal require
instead of import
, and we end up with code which requires the whole lodash
instead of requiring precisely several methods. We need to rollback to previous state of imports (new imports were introduced in webpack4 build config).
Visual state of bundle in app: