postcss-px-to-viewport icon indicating copy to clipboard operation
postcss-px-to-viewport copied to clipboard

How to configure include

Open meiqinLiu opened this issue 4 years ago • 2 comments

Can you write an example of include? How do you write it? I downloaded the above case of GitHub and failed to configure include

meiqinLiu avatar Jun 10 '20 08:06 meiqinLiu

I tested it In this way, it works

meiqinLiu avatar Jun 10 '20 09:06 meiqinLiu

module.exports = { plugins: { 'postcss-px-to-viewport': { viewportWidth: 750, // 设计稿的视口宽度 minPixelValue: 1, // 设置最小的转换数值,如果为1的话,只有大于1的值会被转换 exclude: [/node_modules/], include: [/mobile/] } } }

meiqinLiu avatar Jun 10 '20 09:06 meiqinLiu