vite-plugin-fz
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

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`

Readme

Keywords

Package Sidebar

Install

npm i vite-plugin-fz

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

16.3 kB

Total Files

6

Last publish

Collaborators

  • jooies