chore: use path aliasing

This commit is contained in:
Ryan Walters
2025-08-21 22:04:08 -05:00
parent f83fc24d13
commit cd8feeabd2
6 changed files with 13 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { useDragDropPaths } from "./hooks/useDragDropPaths"; import { useDragDropPaths } from "@/hooks/useDragDropPaths";
import Graph from "./components/graph"; import Graph from "@/components/graph";
import DropOverlay from "./components/drop-overlay"; import DropOverlay from "@/components/drop-overlay";
import type { Frame } from "./types/graph"; import type { Frame } from "@/types/graph";
function App() { function App() {
const data: Frame[] = []; const data: Frame[] = [];

View File

@@ -1,8 +1,8 @@
// Import generated TypeScript types from ts-rs // Import generated TypeScript types from ts-rs
import type { StreamResult } from "./bindings/StreamResult"; import type { StreamResult } from "@/bindings/StreamResult";
import type { StreamDetail } from "./bindings/StreamDetail"; import type { StreamDetail } from "@/bindings/StreamDetail";
import type { StreamResultError } from "./bindings/StreamResultError"; import type { StreamResultError } from "@/bindings/StreamResultError";
import type { MediaType } from "./bindings/MediaType"; import type { MediaType } from "@/bindings/MediaType";
export type { StreamResult, StreamDetail, StreamResultError, MediaType }; export type { StreamResult, StreamDetail, StreamResultError, MediaType };
// Tauri invoke wrapper // Tauri invoke wrapper

View File

@@ -10,8 +10,8 @@ import {
Music, Music,
XCircle, XCircle,
} from "lucide-react"; } from "lucide-react";
import { commands } from "../bindings"; import { commands } from "@/bindings";
import type { MediaType, StreamDetail } from "../bindings"; import type { MediaType, StreamDetail } from "@/bindings";
type DropOverlayProps = { type DropOverlayProps = {
paths: string[]; paths: string[];

View File

@@ -1,4 +1,4 @@
import { formatBytes } from "./format.js"; import { formatBytes } from "@/lib/format";
import { test, expect } from "vitest"; import { test, expect } from "vitest";
test("formats bytes less than 1024", () => { test("formats bytes less than 1024", () => {

View File

@@ -1,7 +1,7 @@
import React from "react"; import React from "react";
import ReactDOM from "react-dom/client"; import ReactDOM from "react-dom/client";
import App from "./App"; import App from "@/App";
import "./global.css"; import "@/global.css";
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode> <React.StrictMode>

View File

@@ -3,7 +3,6 @@ import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite"; import tailwindcss from "@tailwindcss/vite";
import path from "path"; import path from "path";
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST; const host = process.env.TAURI_DEV_HOST;
// https://vite.dev/config/ // https://vite.dev/config/