Giter VIP home page Giter VIP logo

Comments (10)

brillout avatar brillout commented on August 25, 2024 1

It does: https://github.com/brillout/vite-plugin-ssr_windi-css/blob/2310ad8ea3889c0c9fe5f73d902be49b25315273/pages/index/index.page.jsx#L9.

Do I need to do something else?

Yes, see the warning at https://vite-plugin-ssr.com/windi-css.

Please read the docs before asking for help. See https://brillout.github.io/rules/.

from vike.

brillout avatar brillout commented on August 25, 2024

At first glance, I wouldn't know why it doesn't work.

  • @import 'tailwindcss/base'; does work as expected, correct?
  • You did include WindiCSS() in your plugin list in vite.config.js, yes?

from vike.

CanRau avatar CanRau commented on August 25, 2024

Haven't tried any direct Tailwind stuff yet 🤔 How should I go about it?

Yes, WindiCSS() is in my vite.config.js, followed all setup steps which worked correctly as expected in plain vite-react-ts 🤷‍♂️

from vike.

brillout avatar brillout commented on August 25, 2024

Let me have a look

from vike.

brillout avatar brillout commented on August 25, 2024

Working example: https://github.com/brillout/vite-plugin-ssr-vite-plugin-windicss

from vike.

CanRau avatar CanRau commented on August 25, 2024

My fault I should have read the docs better 😅

It defaults to only working with files in /src had to include /pages to options as described here https://windicss.org/guide/vite.html#scanning

(already provided a PR to fix the typo in the example windcss/helpers, misses the second i)

from vike.

brillout avatar brillout commented on August 25, 2024

👍 Let me know if you have any ohter question

from vike.

CanRau avatar CanRau commented on August 25, 2024

Working example: https://github.com/brillout/vite-plugin-ssr-vite-plugin-windicss

Just out of curiosity, I couldn't find any mention of actual Tailwind classNames, have you confirmed they're working?
As according to my trials and the Windi docs on scanning it shouldn't work ^^

from vike.

brillout avatar brillout commented on August 25, 2024

I was wondering the same ^^; I just saw the Tailwind CSS included so I was assumings that things work. (I never used Tailwind CSS.)

had to include /pages to options

If this necessary then we should def add a little guide to vite-plugin-ssr's README. A PR would be warmly welcome :-).

from vike.

konsumer avatar konsumer commented on August 25, 2024

@brillout your demo didn't use any tailwind util classes. It doesn't error for me, but it doesn't apply any windicss styles either.

If I import 'virtual:windi.css' in PageLayout.jsx, it should work, but it doesn't:

Screen Shot 2022-09-05 at 10 20 17 PM

Do I need to do something else?

from vike.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.