-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include 无效 #142
Comments
大佬太懒了,忘记发布最新版本了,npm上面的是老版本 |
朋友你好,我想问下你这个postcss-px-to-viewport支持vite创建的的vue3项目吗? |
@huangwenboha563 支持的,我之前做项目也用过这个,你可以搜一下相关的配置,都差不多的 |
等待着更新,太不方便了 |
可以先用这个xy-postcss-px-to-viewport;使用最新的 |
试了,根本不行 |
在windows目录中path分隔为反斜杠,在传入include/exclude参数需注意;举个栗子: // postcss.config.js
// os: windows
const plugins = {
autoprefixer: {},
'xy-postcss-px-to-viewport': {
exclude: [/\\node_modules\\/i],
include: [/\\src\\views\\home\\/i]
}
}
module.exports = () => {
if (process.env.NODE_ENV === 'development') {
delete plugins.autoprefixer
} else {
// 这里走 CICD 中 Linux 系统;如果你是本地 Windows 打包;注释掉下面两行
plugins['xy-postcss-px-to-viewport'].exclude = [/\/node_modules\//i]
plugins['xy-postcss-px-to-viewport'].include = [/\/src\/views\/home\//i]
}
return {
plugins
}
} |
npm更新了吗? |
求更新npm |
https://www.npmjs.com/package/postcss-px-to-viewport-wfc 这个npm包可以用,支持 include |
直接用github的master分支安装 |
include option invalid, Is there any other plugin instead? |
亲测该依赖可用,推荐这样写正则,分隔符引入依赖变量
|
include无效,看了代码,1.1.1 tag的代码和master的代码不一样,1.1.1 1.1.0代码里面都没有include字符串
The text was updated successfully, but these errors were encountered: