Open jbmolle opened 2 years ago
After time I think it this bug could be a feature, not supporting .class
will keep code consistency as for example colons are not permitted in this syntax, keeping all classes in class attribute keeps it more clean as classes won't be divided at one with special character and without.
Describe the bug Check https://github.com/windicss/nuxt-windicss/issues/144 When using pug class syntax in Nuxt3 with nuxt-windicss, WindiCSS doesn't not add the CSS classes. For example the following
p(class="text-red-600") My Text
works fine and displays a red text But the followingp.text-red-600 My Text
does not.Versions
Additonal Context The problem comes from
getDefaultExtractors
invite-plugin-windicss/packages/plugin-utils/src/extractors/helper.ts
Nuxt uses dist/index.mjs from @windicss/plugin-utils and require('pug') line 17 fails (it calls __require which doesn't work). So the Pug extractor is not added. One solution currently is to add the extractor manually in the WindiCSS config.