Configure webpack
Now that you’ve installed webpack, let’s create the webpack configuration file so we can bundle our project. Depending on your application, it might make sense to split its code across multiple files or aggregate everything into a single file. webpack assembles the source files in a different set of files for deployment. This way you can always choose the most efficient deployment strategy, without changing your source code layout. In an application with multiple screens, you could place all dependencies that are used in every screen in one file, and the code for each screen in a separate file. That way the user only downloads the code for the page they visit. For simple applications like our word counter, which only has a single ...
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