How to write configurable presets?
andywer opened this issue Β· comments
Hey there!
First of all, I'd like to say I really enjoy the idea behind webpack-preset π
But I am trying to figure out how to write a style-loader preset right now and don't know if that's actually possible in a way I think of it...
- I want to be able to configure some preset options in my project. Like if should use CSS modules or not which is just a parameter on the css-loader.
- I would find it desirable to being able to put e.g. the sass-loader on top of it as a separate preset.
I think it's not possible at the moment, but maybe I am just missing something.
PS: I have some more thoughts on merging the webpack config in the preset, babel config, ... Should I open another issues for that?
Cheers
Andy
That's what webpack-conf will be for. Right now I'm clobbering things together, so it's all brittle and coupled code. Once I've got a more declarative API in place, writing presets should be easy.
Cool! Eager to hear news π
Do you tweet about it? ;)
There's a long-ass chain between Yehuda, Ryan, and me off of this tweet: https://twitter.com/ryanflorence/status/747225256218132484
I've let this project sit for too long, so I'm getting back into it and hope to have more of it implemented soon.
I would really like to use it for https://github.com/andywer/postcss-debug :)