From 7a9c0af33a3e100bf64bc65328f9ef9f6ef793eb Mon Sep 17 00:00:00 2001 From: hieu-w Date: Thu, 25 Jul 2024 00:31:30 +0700 Subject: [PATCH] Fix Alias @ --- examples/vue-app/vite.config.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/vue-app/vite.config.js b/examples/vue-app/vite.config.js index 373e1b48..8bbba1f5 100644 --- a/examples/vue-app/vite.config.js +++ b/examples/vue-app/vite.config.js @@ -1,7 +1,6 @@ +import { fileURLToPath, URL } from "url"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; -import path from "path"; -import { fileURLToPath } from "url"; // https://vitejs.dev/config/ export default defineConfig({ @@ -14,7 +13,7 @@ export default defineConfig({ }, resolve: { alias: { - "@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "src"), + "@": fileURLToPath(new URL("./src", import.meta.url)), }, }, });