Skip to content

Commit

Permalink
Merge pull request #9 from martinc1991/feature/absolute-routes-ui
Browse files Browse the repository at this point in the history
Add path aliases in ui package
  • Loading branch information
chescalante authored May 31, 2024
2 parents 85ae743 + c87e364 commit 062322e
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 4 deletions.
48 changes: 47 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"@types/react-dom": "18.2.22",
"@vitejs/plugin-react-swc": "3.5.0",
"typescript": "5.2.2",
"vite": "5.2.0"
"vite": "5.2.0",
"vite-tsconfig-paths": "^4.3.2"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.14.2"
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down
9 changes: 8 additions & 1 deletion packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import tsconfigPaths from "vite-tsconfig-paths";
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
base: "./",
plugins: [react()],
plugins: [react(), tsconfigPaths()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});

0 comments on commit 062322e

Please sign in to comment.