Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

songwuk/esbuild-plugin-unocss

Repository files navigation

tsup-plugin-unocss

An tsup plugin which uses babel build css and js.

NPM version

❤️ Usage

Install tsup and the plugin

npm install -D tsup
npm install -D tsup-plugin-unocss

or

pnpm add -D tsup
pnpm add -D tsup-plugin-unocss

Set up a build script

import { defineConfig } from 'tsup';
import esbuildPluginUnocss from 'tsup-plugin-unocss'

async function myBuilder(){
  const buildResult = await defineConfig({
    entry:[index.ts]
    esbuildPlugins: [
      esbuildPluginUnocss({
        alias: '.',
      })
    ],
  });
}

Run your builder.