I have used many tricks in the past such as creating my own BASH scripts which collected the files from folders and checked the order and trans-piled and minified them to single files. Even that process got to be a pain because it is hard to make sure things are loaded in the right order.
Webpack makes it easier
Instead of explaining webpack in a lot of paragraphs, I will create a list of videos and articles I find helpful. First off what is Webpack? I found this video to be very helpful.
Resources, Articles & links
A Beginner’s Guide to Webpack 4 – A great article to get started with.
Webpack using Source Maps – Webpack documentation page for source maps
Webpack source map devtool – Webpack documentation for the devtool that creates source maps, this lists the options
Webpack SourceMapDevToolPlugin – documentation, this plugin aids the source map devtool to add more features and options.