1.0.8 • Published 3 years ago

vite-plugin-fz v1.0.8

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

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`
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago