-
-
Notifications
You must be signed in to change notification settings - Fork 969
unocss/postcss does not recognise the contents of the packages/** in next monorepo #4094
Copy link
Copy link
Closed
Labels
Description
UnoCSS version
0.62.0
Describe the bug
The monorepo structure is as follows, worked as expected in 0.61.9
After upgrade to 0.62.0, the contents of the packages/** cannot be extracted.
.
├── apps
│ └── web # <-- next.js app
│ ├── src
│ ├── postcss.config.mjs
│ └── uno.config.mjs
└── packages
├── ...
├── ui-echarts
└── ui-web// postcss.config.mjs
const config = {
plugins: [
'@unocss/postcss',
],
}
export default config// uno.config.mjs
import path from 'node:path'
import {fileURLToPath} from 'node:url'
import {defineConfig, presetUno, transformerDirectives} from 'unocss'
const projectRoot = path.dirname(fileURLToPath(import.meta.url))
const workspaceRoot = path.resolve(projectRoot, '../..')
// console.log({projectRoot, workspaceRoot})
const config = defineConfig({
presets: [
presetUno(),
],
transformers: [
transformerDirectives(),
],
content: {
filesystem: [
`${projectRoot}/src/**/*.{tsx,html}`,
`${workspaceRoot}/packages/ui-*/src/**/*.{tsx,html}`
]
}
})
export default configThe image above is the output of v0.61.9 ✅ and the following is v0.62.0 ❌

Reproduction
blacksand/unocss-postcss-issue-report
System Info
Node: 20.16.0
OS: darwin-x64
pnpm: 9.7.1
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable