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?
In modular programming, developers break programs up into discrete chunks of functionality called a module.
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.
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).
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With