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-rem-px

vite字体px自动响应
https://github.com/zys8119/vitejs-plugin-rem-px

Last synced: 10 days ago
JSON representation

vite字体px自动响应

Awesome Lists containing this project

README

        

# vitejs-plugin-rem-px

vite字体px自动响应

## 安装

```
npm i vitejs-plugin-rem-px -S
```

## 使用方法

main.ts

```typescript
import {createApp} from "vue"
import remPlug from "./index"
createApp(App)
.use(remPlug,{
base:1440
})
.mount("#app")
```

vite.config.ts

```typescript
import {UserConfig} from 'vite'
import remPlug from './remPlug.ts'
import {resolve} from "path"

export default {
plugins: [
remPlug({
resolve(__dirname, "./src/assets/less/public.less"),
}),
],
}

```