Files
websopy-taro/postcss.config.js
赵忠林 5f71295aae feat(postcss): 添加插件移除微信小程序不兼容Tailwind规则
- 实现 postcss-remove-wxss-incompatible 插件
- 移除反斜杠转义的重要性修饰符类选择器(.\!xxx)
- 删除依赖 :not 和兄弟选择器的 .space-[x|y]-* 规则
- 删除依赖 :not 和兄弟选择器的 .divide-[x|y]-* 规则
- 解决微信小程序 WXSS 不支持的 CSS 特性问题
2026-06-30 16:38:54 +08:00

13 lines
386 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const wxssIncompatiblePlugin = require('./postcss-remove-wxss-incompatible')
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
require('postcss-nested'),
// 移除 WXSS 不兼容的 Tailwind CSS 规则
// 包括 .\!xxx反斜杠转义 !、space-x/y-*:not + ~ 组合器、divide-x/y-* 等
wxssIncompatiblePlugin()
]
}