Closed s97712 closed 3 months ago
Hey, You should check this : #377
Edit: #385 is similar
@s97712 @Soufou69
Resolving tsconfig.json
might not be the best approach. Instead, if a "valid" tsconfig isn't found, we should prompt the user for a path alias and its resolution.
Example:
"paths": {
"~/*": ["./src/*"]
}
We can then save the alias and path (value) in park-ui.json
.
{
"$schema": "https://park-ui.com/registry/latest/schema.json",
"importAlias": "~/*",
"jsFramework": "react",
"outputPaths": {
"componentsDir": "~/components/ui",
"libDir": "~/lib"
},
"paths": {
"~/*": ["./src/*"]
}
}
@s97712 @Soufou69
I've updated the CLI so that a tsconfig.json is no longer required to install components. This benefits users with setups like nx workspaces that lack a tsconfig.json file.
Here’s my tsconfig.json file. I’m referencing other configurations, but park-ui isn’t handling it properly.