Webpack is a module bundler. Webpack takes modules with dependencies and generates static assets representing those modules.
The main interest of using Webpack is that it will compile all your styles - which we advise you to write using Sass - into a single CSS file. This way, your theme will make only one HTTP request for this single file, and since your browser will cache it for later re-use, it will even download this file only once.
If you want to compile your assets using Webpack (and we advise you to), follow these steps:
npm run build.
npm run watch.
The Webpack configuration file for Classic Theme is thus:
It provides proper configuration for compile your Sass or CSS files into a single CSS file.