0.0.4 • Published 2 years ago

vite-plugin-inspector-lib-css v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vite-plugin-inspector-lib-css

将库模式下的unocss样式打包注入到bundle

Why

在使用tsx写vue组件时,vite build将css注入js中,但unocss并未生产对应转换的css被一起注入,才有了这个库

Install

npm i vite-plugin-inspector-lib-css -D

Usage

// vite.config.js
import { defineConfig } from 'vite'
import vitePluginInspectorLibCss from 'vite-plugin-inspector-lib-css'
export default defineConfig({
  plugins: [
    vitePluginInspectorLibCss()
  ]
})

Warning

  • ts | js | tsx | jsx 文件中头部需要加上// @unocss-include否则不会被注入

:coffee:

:question: 问题

issues

依赖

unocss

0.0.3

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago