Subscribe on changes!

Compiler optimization with css module

avatar
Oct 18th 2020

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

avatar
Oct 9th 2022

so far, any update? Is that doing?