feat(postcss): 添加插件移除微信小程序不兼容Tailwind规则
- 实现 postcss-remove-wxss-incompatible 插件 - 移除反斜杠转义的重要性修饰符类选择器(.\!xxx) - 删除依赖 :not 和兄弟选择器的 .space-[x|y]-* 规则 - 删除依赖 :not 和兄弟选择器的 .divide-[x|y]-* 规则 - 解决微信小程序 WXSS 不支持的 CSS 特性问题
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
const wxssIncompatiblePlugin = require('./postcss-remove-wxss-incompatible')
|
||||
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
'postcss-nested': {}
|
||||
}
|
||||
plugins: [
|
||||
require('tailwindcss'),
|
||||
require('autoprefixer'),
|
||||
require('postcss-nested'),
|
||||
// 移除 WXSS 不兼容的 Tailwind CSS 规则
|
||||
// 包括 .\!xxx(反斜杠转义 !)、space-x/y-*(:not + ~ 组合器)、divide-x/y-* 等
|
||||
wxssIncompatiblePlugin()
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user