windicss vite integration. #37
-
Does anyone know if you need to do anything further to enable the windicss vite plugin with vite-rails? I am running it in a docker container for development, if that changes anything.
I've set a h1 to have bg-red-300 but it's not working so far. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Looks like the plugin isn't auto looking at .html.erb files.
|
Beta Was this translation helpful? Give feedback.
-
I've found the documentation for options! I'll test it out in a couple of days when I have time and report back in case anyone else is trying to solve this. https://github.com/windicss/vite-plugin-windicss/blob/main/packages/plugin-utils/src/options.ts |
Beta Was this translation helpful? Give feedback.
-
Hi @Manborough! Check this repo for a working example: https://github.com/ElMassimo/pingcrm-vite I recently made a PR to Windi CSS to add a You should specify the WindiCSS({
root: process.cwd(),
scan: {
fileExtensions: ['erb', 'html', 'vue', 'rb', 'jsx', 'tsx'],
dirs: ['app/views', 'app/helpers', 'app/javascript'],
},
}), I might add this to a FAQs section in the docs. |
Beta Was this translation helpful? Give feedback.
Hi @Manborough!
Check this repo for a working example: https://github.com/ElMassimo/pingcrm-vite
I recently made a PR to Windi CSS to add a
root
option here.You should specify the
root
to match the Rails root:I might add this to a FAQs section in the docs.