Closed seepine closed 10 months ago
vite.config.ts
export default defineConfig({ plugins: [ uni() ], css: { postcss: { // 必须手动引入 plugins: [require('tailwindcss'), require('autoprefixer')] } } })
编译后会有*选择器,而小程序不支持
[ WXSS 文件编译错误] ./app.wxss unexpected token "*" 5 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) 6 | */ > 7 | *, | ^ 8 | ::before, 9 | ::after { 10 | box-sizing: border-box; /* 1 */ at files://app.wxss#7(env: Windows,mp,1.06.2310080; lib: 3.2.1)
翻这个项目的时候,正好看到你这个问题,
试试这个weapp-tailwindcss
感谢,看了下你这个,功能挺强大,但配置好像有点繁杂 最终使用了这个 https://github.com/uni-helper/vite-plugin-uni-tailwind
vite.config.ts
编译后会有*选择器,而小程序不支持