Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does webpack mean by XX hidden modules

I've been playing with webpack and during the build I see it output: + 27 hidden modules. What does it mean by this? Is it detecting global constants that I'm using without requiring them?

like image 979
Christian Schlensker Avatar asked Mar 04 '15 15:03

Christian Schlensker


People also ask

What is a module in webpack?

In modular programming, developers break programs up into discrete chunks of functionality called a module.

What is webpack and what problem does it solve?

Webpack applies automatic transformations on your working files to make them into production files that are more useful for your end user. Those transformed files are copies, and they go to a different folder, so the original files are never modified on this process and stuff keeps tidy.

What is new in webpack5?

webpack 5 also brings a new experiments configuration option with support for WebAssembly, Async Web Assembly, Top Level Await, and outputting your bundle as a module (previously only possible with rollup).

How does webpack bundling work?

Webpack is a module bundler. It takes disparate dependencies, creates modules for them and bundles the entire network up into manageable output files. This is especially useful for Single Page Applications (SPAs), which is the defacto standard for Web Applications today.


1 Answers

Webpack hides modules coming from folders like ["node_modules", "bower_components", "jam", "components"] in your console output by default. This helps you to focus on your modules instead on your dependencies.

You can display them by using the --display-modules argument.

like image 101
Johannes Ewald Avatar answered Sep 27 '22 21:09

Johannes Ewald