Stailwc: an swc plugin for transpiling tailwind directives at compile time

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • swc

    Rust-based platform for the Web

  • So, swc, the speedy web compiler has been building up support for user-defined plugins. I love rust, however I currently have no capacity for it at my day job, where I mostly work with typescript and nextjs. Recently, there has arisen a new generation of faster build tools in the javascript ecosystem such as swc and esbuild. nextjs has earlier this year adopted swc as its primary compiler, and opened up the ability to use swc plugins with it.

  • twin.macro

    ๐Ÿฆนโ€โ™‚๏ธ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, solid-styled-components, stitches and goober) at build time.

  • The blocker for us using it is our use of an excellent library called twin.macro which is built against babel's transpilation APIs to parse tailwindcss directives at compile time so that they may be used with css-in-js libraries. This efficiently bundles your css so that you only ship the precise css you use. The problem is, it's all quite slow.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Tailwind CSS

    A utility-first CSS framework for rapid UI development.

  • The blocker for us using it is our use of an excellent library called twin.macro which is built against babel's transpilation APIs to parse tailwindcss directives at compile time so that they may be used with css-in-js libraries. This efficiently bundles your css so that you only ship the precise css you use. The problem is, it's all quite slow.

  • stailwc

    Tailwind in SWC, Nextjs, and Vite, fast ๐Ÿš€

  • Over the last few days, I started a project in rust targeting swc to replace twin.macro, namely stailwc.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts