used in monorepo
In monorepo, due to the existence of the hoist mechanism, the communication between weapp-tailwindcss and tailwindcss may be blocked. In this case, you need to explicitly specify the path of tailwindcss.
Here we take the configuration of taro@4 and the configuration of config/index.ts as an example
Tailwind CSS 4
const config = {
webpackChain(chain) {
chain.merge({
plugin: {
install: {
plugin: WeappTailwindcss,
args: [
{
cssOptions: {
rem2rpx: true,
},
cssEntries: [
//The path to app.css
path.resolve(__dirname, '../src/app.css'),
],
},
],
},
},
})
},
}
Using this configuration, you can use it in monorepo