Skip to content

Commit

Permalink
Explain vite-tsconfig-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed May 29, 2024
1 parent 38927e2 commit 9b3ee04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// This enables absolute imports like `import { useOidc } from "oidc";`
// instead of `import { useOidc } from "../../oidc";`
// You also need to add "compilerOptions": { "baseUrl": "src" } in your tsconfig.json for it to work
import tsconfigPaths from "vite-tsconfig-paths";
import { viteEnvs } from "vite-envs";
import { TanStackRouterVite } from "@tanstack/router-vite-plugin";
Expand Down

0 comments on commit 9b3ee04

Please sign in to comment.