Skip to content

css modules make it configurable instead returning as proxy #1970

Answered by sheremet-va
aelbore asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can configure classNameStrategy: https://vitest.dev/config/#css-modules-classnamestrategy

You would still need to enable CSS for it to actually process module, using css.include:

export default {
  test: {
    css: {
      include: [/\.module\./]
    }
  }
}

You don't have to specify CSS extension, because this include only applies to CSS files.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aelbore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants