Resolving input files
One of the key strengths of Webpack is that you don't need to supply it with a list of modules that need to be bundled. Once you supply an entry point in the Webpack configuration, it can figure out which modules your application needs, and will bundle them accordingly. Needless to say, this is a complex task that Webpack is performing for you and needs all the help it can get.
For example, part of the resolve configuration is telling Webpack which file extensions to consider, for example, .js or .jsx. You also want to tell Webpack where to look for package modules. These are modules that you didn't write and aren't part of your application. These are npm packages that are typically found in the node_modules directory ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access