I
I
ivanDoligov2020-04-23 18:39:26
JavaScript
ivanDoligov, 2020-04-23 18:39:26

How to see in the final assembly of the project whether the entire lodash library gets into it or not?

Good afternoon! There is such a question, how to properly analyze and make sure what gets from lodash to the final assembly of the project?

Let's analyze if we import methods in this way: then how to understand in the js file after the project is built, does the whole lodash stretch from such imports? if there are a lot of lines of code and let’s say what will get from such an import: there are a lot of articles on this topic that the second option pulls only methods, the question is that there are rumors that webpack can cut off all unnecessary itself and pulls only the necessary methods Thank you!
import { isEqual } from 'lodash'

import isEqual from 'lodash/isEqual'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2020-04-23
@ivanDoligov

https://habr.com/ru/company/jugru/blog/342842/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question