Skip to content

feat: support multiple css-modules imports #2092

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

escaton
Copy link

@escaton escaton commented Jul 24, 2025

Currently vue-loader doesn't support multiple css module sections.
In this example the last one will rewrite the $style object, and $style.root will be undefined.

<template>
  <div :class="$style.root">
    <div :class="$style.child />
  </div>
</template>

<style module critical>
.root { background: black; }
</style>

<style module>
.child { background: red; }
</style>

This PR fixes that.

@escaton
Copy link
Author

escaton commented Jul 24, 2025

Found a duplicate PR: #2045 with slightly different approach to HMR, but a lot more tests

@escaton
Copy link
Author

escaton commented Jul 24, 2025

@yyx990803 @Jinjiang calling you directly, as the repo seems almost abandoned. Could you please take a look at this or #2045 and merge one of them?

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

Successfully merging this pull request may close these issues.

1 participant