Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "multi" in Webpack's output?

Webpack is outputting something like

[78] multi ./src/index.js 28 bytes {0} [built]

What does the multi on this line mean?

like image 820
trusktr Avatar asked Aug 06 '17 15:08

trusktr


1 Answers

multi means multi-file, in other words the multiple webpack entries as an array.

Depends on the entry object, webpack, internally has different approach to handle it. When entry is an array, then MultiEntryPlugin.js is called.

That is the internal flow to follow:

WebpackOptionsApply >

EntryOptionPlugin >

  1. SingleEntryPlugin, if entry is object
  2. MultiEntryPlugin, if entry is array
  3. DynamicEntryPlugin, if entry is function

You can see the test case here: https://github.com/webpack/webpack/tree/v3.4.1/test/binCases/entry/multi-file

like image 167
José Quinto Zamora Avatar answered Sep 18 '22 10:09

José Quinto Zamora