Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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注入
- Host: GitHub
- URL: https://github.com/zys8119/vitejs-plugin-less-global
- Owner: zys8119
- Created: 2021-11-19T08:06:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-22T06:39:16.000Z (almost 3 years ago)
- Last Synced: 2024-10-30T01:37:20.727Z (16 days ago)
- Language: TypeScript
- Size: 52.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"),
]),
],
}
```