Skip to content

Commit

Permalink
fix(docs): update path-alias example from app to src (#3733)
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum authored Mar 10, 2025
1 parent 6f2c25d commit 1bf017a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/start/framework/react/path-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ By default, TanStack Start does not include path aliases. However, you can easil
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["app/*"]
"~/*": ["./src/*"]
}
}
}
```

In this example, we've defined the path alias `~/*` that maps to the `app/*` directory. This means that you can now import files from the `app` directory using the `~` prefix.
In this example, we've defined the path alias `~/*` that maps to the `./src/*` directory. This means that you can now import files from the `src` directory using the `~` prefix.

After updating your `tsconfig.json` file, you'll need to install the `vite-tsconfig-paths` plugin to enable path aliases in your TanStack Start project. You can do this by running the following command:

Expand Down

0 comments on commit 1bf017a

Please sign in to comment.