diff --git a/nuxt.config.ts b/nuxt.config.ts index d3ca9d7..0210aee 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,6 @@ // https://nuxt.com/docs/api/configuration/nuxt-config import { IUser } from "@models/user"; +import { fileURLToPath } from "url"; // import speedkitHydrate from "nuxt-speedkit/dist/runtime/hydrate.mjs"; export type SessionData = IUser; @@ -116,17 +117,17 @@ export default defineNuxtConfig({ // }, // ssr: false, alias: { - "@models": "./lib/models", - "@client": "./lib/client", - "@server": "./lib/server", - "@models/*": "./models/*", - "@client/*": "./lib/client/*", - "@server/*": "./lib/server/*", + "@models": fileURLToPath(new URL("./lib/models", import.meta.url)), + "@client": fileURLToPath(new URL("./lib/client", import.meta.url)), + "@server": fileURLToPath(new URL("./lib/server", import.meta.url)), + "@models/*": fileURLToPath(new URL("./models/*", import.meta.url)), + "@client/*": fileURLToPath(new URL("./lib/client/*", import.meta.url)), + "@server/*": fileURLToPath(new URL("./lib/server/*", import.meta.url)), // "@models/**": "./models/**", // "@client/**": "./lib/client/**", // "@server/**": "./lib/server/**", - "@functions": "./lib/functions.ts", - "@dbconfig": "./lib/dbconfig.ts", + "@functions": fileURLToPath(new URL("./lib/functions.ts", import.meta.url)), + "@dbconfig": fileURLToPath(new URL("./lib/dbconfig.ts", import.meta.url)), }, sourcemap: { server: true,