From ba8f1c50a4d5df0eb4f6106659cd491b1f9569f2 Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Thu, 1 Feb 2024 19:55:30 +0800 Subject: [PATCH] s --- postcss.config.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index 8253759..5f9596c 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,17 +1,12 @@ import postcss from 'postcss'; import pxToViewport from 'postcss-px-to-viewport'; import { customPostCSSPlugin } from "./src/utils/custom-postcss-plugin.js"; // 替换为实际的路径 - -// 将 pxToViewport 应用到 navigation 文件夹下的文件 const customPxToViewportPlugin = postcss.plugin('custom-px-to-viewport', (options) => { const pxToViewportInstance = pxToViewport({ viewportWidth: options.viewportWidth, - // ... 其他 pxToViewport 参数,如果需要的话 }); - return (root, result) => { const file = result.opts.from; - // 确保路径中包含 navigation 文件夹 if (file && file.includes('navigation')) { pxToViewportInstance(root, result); } @@ -21,11 +16,9 @@ const customPxToViewportPlugin = postcss.plugin('custom-px-to-viewport', (option export default { plugins: [ customPostCSSPlugin({ - // ... 你的自定义插件选项 }), customPxToViewportPlugin({ viewportWidth: 1920, }), - // ... 其他通用 PostCSS 插件 ], };