Set up @ path alias
This commit is contained in:
parent
54773a144c
commit
1457187f5e
4 changed files with 39 additions and 10 deletions
|
|
@ -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)),
|
||||
},
|
||||
],
|
||||
},
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue