Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite plugin #4

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Conversation

zyishai
Copy link
Contributor

@zyishai zyishai commented Apr 2, 2024

Vite Plugin

What

This PR adds support for Vite. It'll allow Stylin to run on Vite-based React applications and frameworks (e.g. Remix).

Features

  • Vite support for CSS modules
  • Support for .css and .scss files out of the box
  • Typescript support built in

@sultan99
Copy link
Owner

sultan99 commented Apr 2, 2024

@zyishai, thank you for the incredible work!

I believe we can proceed with this. While there are some unused packages, such as handlebars, having any form of Vite support at this stage is crucial. We can always enhance the code later.

@sultan99 sultan99 merged commit 3fd5a91 into sultan99:main Apr 2, 2024
@sultan99
Copy link
Owner

sultan99 commented Apr 2, 2024

Hey @zyishai!

Thank you for your contributions!

I've published the packages as an alpha version:

  npm i @stylin/[email protected]
  npm i @stylin/[email protected] -D

📺 You can find an online demo that uses Vite and the plugin here.

I've fixed a bug in transformedCode, renamed the folder and package name to @stylin/vite-plugin, and made some script changes for compatibility with the Windows environment.

There's an issue #5 that arises when a kebab-case name is applied to a CSS class name. Do you have any ideas why it is not working?

@zyishai
Copy link
Contributor Author

zyishai commented Apr 2, 2024

I think I have an idea, I'll look more into it in the morning.

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

Successfully merging this pull request may close these issues.

2 participants