You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.5 KiB
65 lines
1.5 KiB
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
import { existsSync } from "node:fs";
|
|
import { createRequire } from "node:module";
|
|
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const configDir = dirname(fileURLToPath(import.meta.url));
|
|
const require = createRequire(import.meta.url);
|
|
|
|
function resolveNuxtNitroErrorHandler(): string {
|
|
const path = join(
|
|
dirname(require.resolve("nuxt/package.json")),
|
|
"..",
|
|
"@nuxt",
|
|
"nitro-server",
|
|
"dist",
|
|
"runtime",
|
|
"handlers",
|
|
"error.mjs",
|
|
);
|
|
if (!existsSync(path)) {
|
|
throw new Error(`Missing Nuxt Nitro error handler: ${path}`);
|
|
}
|
|
return path;
|
|
}
|
|
|
|
export default defineNuxtConfig({
|
|
compatibilityDate: '2025-07-15',
|
|
modules: ['@nuxt/ui'],
|
|
css: ['~/assets/css/main.css'],
|
|
ui: {
|
|
fonts: false
|
|
},
|
|
devtools: { enabled: true },
|
|
typescript: {
|
|
tsConfig: {
|
|
compilerOptions: {
|
|
types: ['bun-types'],
|
|
}
|
|
}
|
|
},
|
|
nitro: {
|
|
errorHandler: [join(configDir, "server/error-json.ts"), resolveNuxtNitroErrorHandler()],
|
|
experimental: {
|
|
tasks: true,
|
|
},
|
|
scheduledTasks: {
|
|
'5 * * * *': ['media:orphan-sweep'],
|
|
},
|
|
typescript: {
|
|
tsConfig: {
|
|
compilerOptions: {
|
|
types: ['bun-types'],
|
|
resolvePackageJsonExports: true,
|
|
resolvePackageJsonImports: true,
|
|
baseUrl: './',
|
|
paths: {
|
|
'drizzle-pkg': ['./packages/drizzle-pkg/lib'],
|
|
'logger': ['./packages/logger/lib']
|
|
},
|
|
}
|
|
},
|
|
}
|
|
},
|
|
})
|
|
|