组件
2023年7月 - JavaScript
可以通过 CLI 使用的组件的 JavaScript 版本。
这个项目及其组件是用 TypeScript 编写的。我们也建议在你的项目中使用 TypeScript。
🌐 This project and the components are written in TypeScript. We recommend using TypeScript for your project as well.
然而,我们提供了组件的 JavaScript 版本,可通过 cli 获取。
🌐 However we provide a JavaScript version of the components, available via the cli.
Would you like to use TypeScript (recommended)? no要选择退出 TypeScript,你可以在你的 components.json 文件中使用 tsx 标志。
🌐 To opt-out of TypeScript, you can use the tsx flag in your components.json file.
{
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app/globals.css",
"baseColor": "zinc",
"cssVariables": true
},
"rsc": false,
"tsx": false,
"aliases": {
"utils": "~/lib/utils",
"components": "~/components"
}
}要配置导入别名,你可以使用以下 jsconfig.json:
🌐 To configure import aliases, you can use the following jsconfig.json:
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}