组件
2024年12月 - 单仓库支持
CLI 中的新 monorepo 支持。
直到现在,在 monorepo 中使用 shadcn/ui 都有点麻烦。你可以使用 CLI 添加组件,但你必须管理组件的安装位置并手动修复导入路径。
🌐 Until now, using shadcn/ui in a monorepo was a bit of a pain. You could add components using the CLI, but you had to manage where the components were installed and manually fix import paths.
借助 CLI 中的新 monorepo 支持,我们使在 monorepo 中使用 shadcn/ui 变得容易得多。
🌐 With the new monorepo support in the CLI, we've made it a lot easier to use shadcn/ui in a monorepo.
CLI现在能够理解单仓库结构,并会将组件、依赖和注册表依赖安装到正确的路径,并为你处理导入。
🌐 The CLI now understands the monorepo structure and will install the components, dependencies and registry dependencies to the correct paths and handle imports for you.
在文档中阅读更多内容。
🌐 Read more in the docs.