Notes for webpack configs to output single files for js and css bundles and more

I often use a site to build webpack configs https://createapp.dev/ and I normally like to have my js and css compiled to one file each within /dist

Out of the box, it handles the entry/output for the .js but a little bit needs to be added to do the same for the .css

Here is an example webpack.config.js

Some important parts added to have the css compile to a single file. First is that the scss file(s) need to be added as an entry:

Secondly, the MiniCssExtractPlugin needs to have an object with the destination css file name added to it as you see here:

 

To process es6+ features like async/await

We must add the below dependency:

Finally, alter the .babelrc to look like :