Closed jonathanglasmeyer closed 8 years ago
Yeah, it's on my todo. I'll likely mention it at the first part of the webpack book somewhere. It's too useful not to integrate.
@jonathanewerner Here's a quick demo if you want to have a look. Let me know what you think. I'm still experimenting with the configuration style though this seems fine (easy to port to ES6).
Looks good to me. :)
Cool. I'll wait some further feedback and then rework the webpack book to this structure. I feel it's clearer now too. And it's easier to split into multiple files if needed and so on.
The usage of functions further motivates the usage of webpack-validator - you can abstract as much as you want while having tdd-like confidence that the 'integration' of those functions still produce a valid config.
@jonathanewerner Yeah, that's a good point. You could push it even further and implement tiny, reusable pieces of configuration that you then merge
together.
I was thinking about something like this at webpack-presets. The approach we are taking here is a notch simpler than that, though. And that's a good thing. :+1:
@jonathanewerner I gave it another pass. Now it's somewhat modular as I split it up per smaller task.
I wonder if tasks
is the right name, sounds like gulp tasks, i.e. stuff that executes commands -- whereas a webpack config is more declarative. Maybe parts
?
Yeah, parts
will work. Thanks. :+1:
The dev
version of the book contains the new setup and mention of webpack-validator
so the next stable one will contain it. Thanks.
:+1: Awesome!
Hi there, What do you think of mentioning webpack-validator in the course? The intended target audience should be pretty much the same. :) I'd be happy to PR.