Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zys8119/vitejs-plugin-less-global

vitejs全局less注入
https://github.com/zys8119/vitejs-plugin-less-global

Last synced: 10 days ago
JSON representation

vitejs全局less注入

Awesome Lists containing this project

README

        

# vitejs-plugin-less-global

vitejs全局less注入

## 安装

```
npm i vitejs/plugin-less-global -S
```

## 使用

vite.config.ts

```typescript
import {UserConfig} from 'vite'
import {resolve} from "path"
import lessPlug from "./index"

export default {
plugins: [
lessPlug([
resolve(__dirname,"./src/assets/less/constant.less"),
resolve(__dirname,"./src/assets/less/publicFun.less"),
]),
],
}
```