Skip to content

移除 uni-app 中默认的 useRem

移除 uni-app 中默认的 useRem,可用于项目的自定义 rem

如何使用

安装

bash
pnpm add @plugin-light/vite-plugin-remove-use-rem -D

vite.config.ts 中添加如下设置:

ts
import { defineConfig } from 'vite';
import { removeUseRemVitePlugin } from '@plugin-light/vite-plugin-remove-use-rem';


export default defineConfig({
  plugins: [
    removeUseRemVitePlugin(),
  ],
});

参数

ts
export interface IRemoveUseRemOptions {
  // 默认为 /uni-h5\.es\.js/
  file?: RegExp;
}

更新日志

点此查看