Closed ismay closed 9 years ago
Haha, yah I was just reading about this. Definitely seems like a step forward. I doubt I'll have the time to implement this, but I'm accepting PRs!
Is there any reason this can't be a plugin? (I haven't read that readme in-depth)
Definitely could, and should. Here's the one I would use: https://github.com/css-modules/postcss-modules-local-by-default. The duo plugin would basically do what css-loader
is doing in webpack.
I might be misunderstanding, but I believe that plugin was just created to make local scope css the default for css-loader. It converted all css to local scope by default, and required you to opt out with a :global
keyword (instead of opt-in with :local
):
It still required css-loader for the local css magic. Also it's been deprecated, since it has been merged into css-loader:
So it would probably be necessary to create a plugin from scratch for local scope css (or use what can be used from css-loader). I completely agree that this should be a plugin btw.
I'm going to close this issues, as it's not a problem duo itself is going to solve. If you have any trouble creating a plugin, feel free to reach back out to us.
I'm pretty busy right now, so I wont be having time to create the plugin anytime soon. But should there be any issues if and when I can find the time I'll let you know. Thanks!
I recently discovered that webpack's css-loader allows you to write css in a local scope: the end of global css (repo here: https://github.com/webpack/css-loader#local-scope)
Now I prefer using duo, and was wondering whether this kind of functionality would fit within duo, and if so, how? I think it would be a great thing for duo to support.