martonlederer / esbuild-plugin-postcss2

Use postcss with esbuild
MIT License
33 stars 19 forks source link

A way to control extension of CSS Modules. #14

Open YurySolovyov opened 3 years ago

YurySolovyov commented 3 years ago

Right now there is no way to control how the plugin decides if a file should be treated as a module, cause regexp for that is hard-coded as /\.module/. If I want to use any of my css/sass files as a module, I have to name them all as *.module.css. Do you think we can make this configurable?

martonlederer commented 3 years ago

This is the standard for CSS modules, but if you want to, create a PR with a custom option. Just make sure the default one is .module

gsouf commented 2 years ago

@martonlederer not all apps use this standard, so even though this is the standard I don't think it hurts to make it configurable. Does it?

martonlederer commented 2 years ago

As I said, I have no problems with making it configurable

Just make sure the default one is .module

gsouf commented 2 years ago

@martonlederer sorry my bad I did read your message too quickly. Here is a PR for it #34