Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unocss vscode extension root configuration item does not support configuring multiple subdirectories #1764

Closed
zhump opened this issue Oct 17, 2022 · 8 comments
Labels

Comments

@zhump
Copy link

zhump commented Oct 17, 2022

my project directory

├── node_modules
├── package.json
├── packages
        ├── web-demo1
        ├── web-demo2
├── pnpm-lock.yaml
├── pnpm-workspace.yaml

image

unocss vscode extension root configuration item does not support configuring multiple subdirectories
I would like to support configuring multiple folders

{
  "unocss.root": "packages/*"
}

how can i solve this problem?

@azaleta
Copy link
Contributor

azaleta commented Oct 17, 2022

web-demo1 or web-demo2
do not support multi entry now.

@zhump
Copy link
Author

zhump commented Oct 18, 2022

web-demo1 or web-demo2 do not support multi entry now.

Are there plans to support this feature? tailwindcss is currently supported.

@dxhuii
Copy link

dxhuii commented Nov 23, 2022

我也有这样的问题,啥时候能支持?或者这样也行

{
  "unocss.root": ['apps/a', 'apps/b', 'packages/a', 'packages/b']
}

数组的形式也行。

@SKT1yang
Copy link

monorepo项目就是没提示,很郁闷啊 啥提示没有

@SKT1yang
Copy link

项目运行没问题,{
"unocss.root": 'config/vite/src/unocss.config.ts'
}
外部vscode插件不生效,

@tobiasdalhof
Copy link

tobiasdalhof commented Jan 21, 2023

Do you have different unocss configs across your monorepo?

If no, why not create a single unocss config file in your project root and pass the config path in your vite config?

// vite.config.ts in ./packages/web-demo1

import { resolve } from 'path'
import { defineConfig } from 'vite'
import UnoCSS from 'unocss/vite'

export default defineConfig({
  plugins: [
    UnoCSS(resolve(__dirname, '../../unocss.config.ts')),
  ],
})
// vite.config.ts in ./packages/web-demo2

import { resolve } from 'path'
import { defineConfig } from 'vite'
import UnoCSS from 'unocss/vite'

export default defineConfig({
  plugins: [
    UnoCSS(resolve(__dirname, '../../unocss.config.ts')),
  ],
})

@stale
Copy link

stale bot commented Mar 22, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 22, 2023
@stale stale bot closed this as completed Mar 29, 2023
@panzhangguo
Copy link

项目运行没问题,{ "unocss.root": 'config/vite/src/unocss.config.ts' } 外部vscode插件不生效,

处理了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants