vite-plugin-stitches
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

⚠️ EXPERIMENTAL - USE WITH CAUTION

vite-plugin-stitches

A tiny helper to configure SSR for Stitches in Vite

NPM Version Types Included Apache-2.0 License NPM Downloads Follow @joebell_ on Twitter


Usage

  1. Install the package via your favourite package manager:

    npm i vite-plugin-stitches
  2. Export getCssString from you Stitches config

    // your-stitches-config
    import { createCss } from "@stitches/core";
    
    export const { getCssString } = createCss({
      // your config
    });
  3. Import your getCssString into vite.config.js and add to ViteStitches():

    Note: in it's current iteration, vite-plugin-stitches doesn't transpile ts/esm files for you. You'll need to do this manually

    import { getCssString } from "your-stitches-config";
    import ViteStitches from "vite-plugin-stitches";
    
    export default defineConfig({
      plugins: [ViteStitches({ getCssString })],
    });

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-stitches

Weekly Downloads

4

Version

0.0.1

License

Apache-2.0

Unpacked Size

15.8 kB

Total Files

5

Last publish

Collaborators

  • joebell93