redfox-mx / vite-lit-css

Awsome plugin to import style files as css lit tagged templates
4 stars 0 forks source link

Vite v5 support #2

Closed klasjersevi closed 5 days ago

klasjersevi commented 4 months ago

This looks so promising, but unfortunately it wasn't compatible with Vite v5.2.10, which I'm currently using.

Is there a possibility to add Vite v5 support?

Thanks, Klas

delaneyj commented 3 months ago

I'm running into the same issue. Specifically using 4.5.3 works but using 5.2.13 yields

vite v5.2.13 building for production...
✓ 2 modules transformed.
x Build failed in 640ms
error during build:
src/lib/test.ts (5:0): Expression expected (Note that you need plugins to import files that are not JavaScript)
file: /.../src/lib/test.ts:5:0
redfox-mx commented 3 months ago

Hi! Thanks, unfortunately vite default export for styles has been removed and I need to rewrite some patches since internal apis now works a little bit different. I mean, sounds easy but it's needs a lot of research into vite source code n.n'

So maybe I need more time to get it works :c but please, be patient ❤️

delaneyj commented 3 months ago

Thanks for the update, for now I moved back to vite4 as your project is wonderful for fast track development tailwindcss/daisyui with lit. Look forward to an update when you have time! Using for a time travelling inspector for https://data-star.dev

redfox-mx commented 2 months ago

Hi @delaneyj, @klasjersevi

I have been working on updates for vite 5, could you test 2.0.0-vite.5 version?

I drop support for css modules and if you have stylesheets imported in your index.html must be setted inside exclude option to get it works

klasjersevi commented 3 weeks ago

I have been working on updates for vite 5, could you test 2.0.0-vite.5 version?

Nice, I'll try it out as soon as I get a chance.

klasjersevi commented 2 weeks ago

Hi @delaneyj, @klasjersevi

I have been working on updates for vite 5, could you test 2.0.0-vite.5 version?

I drop support for css modules and if you have stylesheets imported in your index.html must be setted inside exclude option to get it works

I've tested it in my vite 5 project now and it seems to work fine! 👍 I couldn't find any issues.