vite-plugin-fz
v1.0.8
Published
Use npm or yarn install vite-plugin-fz
Downloads
6
Readme
Install
Use npm or yarn install vite-plugin-fz
yarn add vite-plugin-fz
vite.config.ts
import { rem } from 'vite-plugin-fz'
export default defineConfig({
// ...
plugins: [
// ...,
rem({ base: 1920, baseHeight: 1080 })
]
// ...,
})
If you are using auto-import, you can add preset to it
import { remPreset } from 'vite-plugin-fz'
export default defineConfig({
// ...
plugins: [
// ...
AutoImport({
imports: [
// ...
remPreset
// ...
]
})
]
// ...,
})
Usage with css
a {
font-size: 100fz;
height: 100fh;
}
Usage with script
import { fz, fh } from 'vite-plugin-fz'
fz(20)
fh(20)
fz`20`
fh`20`