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 of your project.

There are more advanced options as well, such as creating aliases for modules and using resolver plugins. Once again, none of these things are relevant to you before you write any React code, yet, you need them configured so that you can develop your components, unless of course, you're using react-scripts to take care of this configuration for you.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.119.17