I get that's how Webpack users are used to doing it, but when you're new to it (or just coming back to it from a different build system) it's the very definition of insanity.
Also, feel free to disagree about the CSS, I think it's a very intuitive way of including assets.
I thought the breaking API changes with 2.0 would at least accommodate this incredibly common use of a bundler, but no.
Unanswered questions that I left the project with (I time-boxed myself to 4 hours; as that was the initial length of time it took me to get gulp up and running in totality):
- Why do I need a require for my CSS? I literally want to replace the css with its minified form. Maybe even bundle it together (I'd settle for the former).
- How the heck is web-pack doing all this; and why is the package called 'extract-css-loader'? I don't want to extract CSS; I want to minify it.
- If I want a source folder and a dist/ folder for my CSS; how would I get Webpack to update the URLs in the .html files?
- Am I crazy for still doing this through HTML? Is there a 'better way' ?
https://github.com/webpack/webpack/blob/master/examples/css-...
https://webpack.js.org/loaders/css-loader/#src/components/Si...
Note: examples at bottom of second link, found it by searching "css" in the doc site