Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Usage with windicss #53

Open
lukashass opened this issue Mar 11, 2022 · 3 comments
Open

Usage with windicss #53

lukashass opened this issue Mar 11, 2022 · 3 comments

Comments

@lukashass
Copy link

I'm trying to use vitebook in a project that uses WindiCSS for styling components.

While WindiCSS is pretty similar to tailwind, I suspect that the setup might be considerably different since WindiCSS generates classes on demand. Are there any resources available that might help with this setup?

@hrishikesh-k
Copy link

I stumbled upon the same issue and found my way out. Not sure if this is the correct way, but it gets the job done.

in .vitebook/config.ts:

import {defineConfig} from '@vitebook/client/node'
import WindiCSS from 'vite-plugin-windicss'
export default defineConfig({
  plugins: [WindiCSS()]
})

in .vitebook/App.vue:

<script
  lang = "ts">
  import 'virtual:windi.css'
</script>

@Mnigos
Copy link

Mnigos commented Sep 15, 2022

@hrishikesh-k doesn't work for me

@hrishikesh-k
Copy link

Can't say much without looking at a reproduction :)

I posted the above after it worked for me - but then, I also stopped using Vitebook within a day, so maybe it's no longer working - if anything has changed meanwhile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants