The way Webpack works is: treat your project as a whole, through a given main file (such as: index.js), Webpack will find all the dependency files of your project starting from this file, use loaders to process them, and finally Packaged into one (or more) browser-readable JavaScript files.