evrone / postcss-px-to-viewport

A plugin for PostCSS that generates viewport units (vw, vh, vmin, vmax) from pixel units. The best choice to create a scalable interface on different displays by one design size.
https://evrone.com/postcss-px-viewport
MIT License
2.99k stars 401 forks source link

include 设置了不起作用所有的都进行了转换 #108

Open 2395000206 opened 2 years ago

2395000206 commented 2 years ago

image

lovewenzi commented 2 years ago

exclude

zhouyou-az commented 2 years ago

I encounter the same problem,then solved it by below steps:

  1. npm install @our-patches/postcss-px-to-viewport --save-dev (Because of the package which author published in npm is not freshly)
  2. Use /components\\home\\mobile/ if your operating system is windows.

There are my options settings,it works fine. image

2395000206 commented 2 years ago

一样没用,我用的是nuxt.js ,你可以拉个项目试试的

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年8月26日(星期四) 下午3:11 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [evrone/postcss-px-to-viewport] include 设置了不起作用所有的都进行了转换 (#108)

I encounter the same problem,then solved it by below steps:

npm install @our-patches/postcss-px-to-viewport --save-dev (Because of the package which author published in npm is not freshly)

Use /components\home\mobile/ if your operating system is windows.

There are my options settings,it works fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

ZhaoYu8 commented 2 years ago

不需要那么复杂。如果是单个文件 include: [/orderBoard.vue/]。如果是文件夹 include: [/orderBoard/]。不需要加src加什么views。直接最终的文件夹名称就可以了。

ZedCoding commented 2 years ago

I encounter the same problem,then solved it by below steps:

  1. npm install @our-patches/postcss-px-to-viewport --save-dev (Because of the package which author published in npm is not freshly)
  2. Use /components\\home\\mobile/ if your operating system is windows.

There are my options settings,it works fine. image

ahooo!it works justfor vue2+webpack but not vue3+vite2.x? have any idea? image

ZedCoding commented 2 years ago

I encounter the same problem,then solved it by below steps:

  1. npm install @our-patches/postcss-px-to-viewport --save-dev (Because of the package which author published in npm is not freshly)
  2. Use /components\\home\\mobile/ if your operating system is windows.

There are my options settings,it works fine. image

ahooo!it works justfor vue2+webpack but not vue3+vite2.x? have any idea? image

have solved! incorrect reg!!