General observations about docs: database/path aliases
Path Aliases
1. "By default, TanStack Start does not include path aliases" - not true
2. As i see, @ symbol is used in imports
Databases
Could use examples, at least for Recommended Database Providers.
For example:
Install needed packages:
Define object for database connection
Then use it in server function (or loader or any server executed code)
Path Aliases | TanStack Start React Docs
Path aliases are a useful feature of TypeScript that allows you to define a shortcut for a path that could be distant in your project's directory structure. This can help you avoid long relative impor...
Databases | TanStack Start React Docs
Databases are at the core of any dynamic application, providing the necessary infrastructure to store, retrieve, and manage data. TanStack Start makes it easy to integrate with a variety of databases,...
4 Replies
afraid-scarlet•2mo ago
"By default, TanStack Start does not include path aliases" - not true As i see, @ symbol is used in importswhere is it used? in the examples?
afraid-scarletOP•2mo ago
Well, when i scaffold project with CLI
rare-sapphire•2mo ago
What the docs means that path aliases are not automatically added by start (
@tanstack/react-start/plugin/vite) so you need to manually add another plugin to handle path aliases.
But scaffolding the project using CLI adds vite-tsconfig-paths plugin for you.
But again, the docs mean that path alias is outside of start's scope.
If that is difficult to understand, then the docs should be rephrased to be more comprehensibleafraid-scarletOP•2mo ago
ok, understood, thanks for clarifications! 🙂