Set up @ path alias

This commit is contained in:
Joscha 2025-01-27 19:19:14 +01:00
parent 54773a144c
commit 1457187f5e
4 changed files with 39 additions and 10 deletions

View file

@ -1,8 +1,8 @@
import tailwindcss from "@tailwindcss/vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;
// https://vitejs.dev/config/
@ -30,4 +30,12 @@ export default defineConfig(async () => ({
ignored: ["**/src-tauri/**"],
},
},
resolve: {
alias: [
{
find: "@",
replacement: fileURLToPath(new URL("./src", import.meta.url)),
},
],
},
}));