Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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自动响应
- Host: GitHub
- URL: https://github.com/zys8119/vitejs-plugin-rem-px
- Owner: zys8119
- Created: 2021-11-19T08:03:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-22T07:32:21.000Z (almost 3 years ago)
- Last Synced: 2024-09-18T17:49:12.623Z (about 2 months ago)
- Language: TypeScript
- Size: 81.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"),
}),
],
}```