Answer the question
In order to leave comments, you need to log in
Why specify dependencies in webpack require.ensure?
In the webpack dock, when creating a chunk, it is possible to specify dependencies. The idea of writing a dependency is not entirely clear, if everything in the callback is requested via require, it will fall into the chunk.
That is, what is the difference
require.ensure(['jquery'], function(require) {
require("jquery");
});
и
require.ensure([], function(require) {
require("jquery");
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question