Mokshit06 / typewind

The safety of Typescript with the magic of Tailwind.
https://typewind.dev/
MIT License
2.19k stars 25 forks source link

Svelte(Kit) Support? #1

Open pheuter opened 1 year ago

pheuter commented 1 year ago

First of all, kudos on what looks to be a great library 🎉

Noticed the Vite docs that show how to add the Babel plugin for React, any chance this currently supports Svelte / SvelteKit?

e2goon commented 1 year ago

Hi. I tried to make Sveltekit samples, but it's not easy. 😢

ReferenceError: module is not defined
    at /@fs/Users/powerjade/Documents/typewind/packages/typewind/dist/index.js:18:1
    at instantiateModule (file:///Users/powerjade/Documents/typewind/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:52224:15)

I think we're almost there, but I think we need to setup the babel for SvelteKit. But I don't know if this is right. I'm thinking about how not to use babel.

wobsoriano commented 1 year ago

You'll have to use custom preprocessor + typewind/babel

Mokshit06 commented 1 year ago

I think the main thing blocking sveltekit and solid-start is ESM support. Typewind currently only ships commonjs bundles, but both of these frameworks require the libraries to support esm

VinSpee commented 1 year ago

This would enable support for Qwik as well