In webpack config there are multiple things for configuration, the most important ones are
-
entry– can be an array or an object defining the entry point for the asset you want to bundle, can be a js as test here says do it only for /.js$. Your application if has multiple entry points use an array. -
include– defines the set of path or files where the imported files will be transformed by the loader. -
exclude– do not transform file from these places. -
output– the final bundle you want to create. If you specify, for example,output: { filename: "[name].bundle.js", vendor: "react" }Then your application js files will be bundled as main.bundle.js and react in a vendor.js files. It is an error if you do not use both in html page.
Hope it helped