From d3a47e18409b5de2911b05dfa750ee48c4a62039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 20 Dec 2023 18:01:31 -0500 Subject: [PATCH] fix(nuxt): edit path aliases rollup fucking sucks x2 --- nuxt.config.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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,