Skip to content

Commit

Permalink
docs: update install command (#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
rxliuli authored Feb 4, 2025
1 parent 3dc8f14 commit fcc1530
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
19 changes: 8 additions & 11 deletions sites/docs/src/content/installation/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ The current version of Vite splits TypeScript configuration into three files, tw
Add the `baseUrl` and `paths` properties to the `compilerOptions` section of the `tsconfig.json` and
`tsconfig.app.json` files:

```json title="tsconfig.json" {3-7}
```ts title="tsconfig.json" {7-13}
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
Expand All @@ -44,18 +49,10 @@ Add the `baseUrl` and `paths` properties to the `compilerOptions` section of the

Add the following code to the `tsconfig.app.json` file to resolve paths, for your IDE:

```ts title="tsconfig.app.json" {11-17}
```json title="tsconfig.app.json" {4-8}
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
],
"compilerOptions": {
// ...
"baseUrl": ".",
"paths": {
"$lib": ["./src/lib"],
Expand Down
2 changes: 1 addition & 1 deletion sites/docs/src/lib/components/docs/pm-install.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
export let command: string = "";
</script>

<PMBlock type="add" {command} />
<PMBlock type="install" {command} />

0 comments on commit fcc1530

Please sign in to comment.