Open yoyo930021 opened 3 years ago
Ref: https://twitter.com/Linus_Borg/status/1310844386536718339?s=20
Vue 3 compiler currently cannot treat CSS module classes as static. We might have some way of dealing with it. e.g. mark it as static or pre-compile the css module class as a static string.
POC: https://github.com/yoyo930021/vue-pre-css-module/blob/main/src/index.ts#L67 In this POC, I try to use NodeTransform for pre-compile the css module class as a static string. But it lacks information on several key operations. Mainly related to the path and settings.
NodeTransform
I think there are two ways to achieve this. One for more information on NodeTransform. One is built into vue-loader or @vue/compiler-dom.
vue-loader
@vue/compiler-dom
No
so far, any update? Is that doing?
What problem does this feature solve?
Ref: https://twitter.com/Linus_Borg/status/1310844386536718339?s=20
Vue 3 compiler currently cannot treat CSS module classes as static. We might have some way of dealing with it. e.g. mark it as static or pre-compile the css module class as a static string.
POC: https://github.com/yoyo930021/vue-pre-css-module/blob/main/src/index.ts#L67 In this POC, I try to use
NodeTransform
for pre-compile the css module class as a static string. But it lacks information on several key operations. Mainly related to the path and settings.I think there are two ways to achieve this. One for more information on NodeTransform. One is built into
vue-loader
or@vue/compiler-dom
.What does the proposed API look like?
No