浏览代码

✨ feat(config): 添加postcss pxtransform配置

- 启用pxtransform插件进行px单位转换
- 配置基准字体大小为14px
- 设置最小根字体大小为14px
yourname 3 月之前
父节点
当前提交
996c3e6a81
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      mini/config/index.ts

+ 7 - 0
mini/config/index.ts

@@ -96,6 +96,13 @@ export default defineConfig<'webpack5'>(async (merge, { command, mode }) => {
         chunkFilename: 'css/[name].[chunkhash].css'
       },
       postcss: {
+        pxtransform: {
+          enable: true,
+          config: {
+            baseFontSize : 14,
+            minRootSize: 14
+          }
+        },
         autoprefixer: {
           enable: true,
           config: {}