Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to check .module.css files #182

Open
Aliaksei-Martsinkevich opened this issue Sep 24, 2019 · 6 comments
Open

Impossible to check .module.css files #182

Aliaksei-Martsinkevich opened this issue Sep 24, 2019 · 6 comments

Comments

@Aliaksei-Martsinkevich
Copy link

I have all css modules files names as following: *.module.css (i.e. Button.module.css) with corresponding tsx file *.tsx (i.e. Button.tsx). And using current template capabilities, I cannot match these files, because cssName equals to Button.module in this case.

I suggest to provide ability to specify resolver as custom function type DocumentPathResolver = (cssFilePath: string) => string | null, which would return path to a document.
(i.e. it should be possible to provide such function via option resolve.documents)

@nodaguti
Copy link
Owner

Thank you for your suggestion! That would add extra flexibility and must be useful. I'll work on this this weekend.

@ivkirill
Copy link

Is there any movement on this issue?

@jklmli
Copy link

jklmli commented Jan 17, 2022

Please add support for this! Next.js comes built in with CSS modules in files of the form *.module.css, and adding support for this would open it up to that audience.

@kutsan
Copy link

kutsan commented Jun 12, 2022

Friendly ping @nodaguti.

@tnagorra
Copy link

A quick an easy way to solve this would be a list of suffix that can be removed from the css filename, so that it can be compared with the js files.

@wawezz
Copy link

wawezz commented Nov 27, 2023

Will you make solution for *.module.css files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants