You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vite-plugin-vue-style-pxtorem

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-vue-style-pxtorem

转换vue模板内联样式px到rem

1.2.1
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-vue-style-pxtorem

一个vite插件转换vue模板内联样式px到rem

Install

pnpm install vite-plugin-vue-style-pxtorem --save-dev

options

Type: Object | Null
Default:

{
    rootValue: 16,
    unitPrecision: 5,
    minPixelValue: 0,
    exclude: []
}

注意

  • 此插件只对vue文件中的<template>标签内的内容做转换
  • 此插件必须在@vitejs/plugin-vue之前,因为vue文件会被@vitejs/plugin-vue编译,后续无法通过/<template>([\s\S]+)<\/template>/gi匹配到。

参考插件

postcss-pxtorem

Keywords

vite

FAQs

Package last updated on 19 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts