Skip to content

Support CSS modules localsConvention #5900

@dword-design

Description

@dword-design

What problem does this feature solve?

The localsConvention option of CSS modules allows to configure how the fields in the style object will be named. It's also configurable via Vite/Nuxt, but @vue/language-core ignores it and always generates the field name equal to the class name.

What does the proposed solution look like?

Add new option cssModulesLocalsConvention in vueCompilerOptions in tsconfig.json to configure it. Since we cannot access Vite or Nuxt configs, I think vueCompilerOptions is the best place and there is already strictCssModules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions