You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Check windicss/nuxt-windicss#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 following p.text-red-600 My Text does not.
Versions
nuxt-windicss: 2.1.1
nuxt3: latest
vite-plugin-windicss: 1.5.4
vite: 2.7.3
Additonal Context
The problem comes from getDefaultExtractors in vite-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.
The text was updated successfully, but these errors were encountered:
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 windicss/nuxt-windicss#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 textBut the following
p.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.
The text was updated successfully, but these errors were encountered: