49 lines
1.0 KiB
TypeScript
49 lines
1.0 KiB
TypeScript
import { version } from "./package.json";
|
|
|
|
// WordPress backend URL (required)
|
|
const wpUrl = process.env.NUXT_WP_URL;
|
|
if (!wpUrl) {
|
|
throw new Error("NUXT_WP_URL environment variable is not set");
|
|
}
|
|
console.log(`${wpUrl}/graphql`);
|
|
|
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
export default defineNuxtConfig({
|
|
modules: ["@lewebsimple/nuxt-graphql", "@nuxt/ui", "nuxt-svgo"],
|
|
|
|
compatibilityDate: "2026-03-18",
|
|
devtools: { enabled: true },
|
|
|
|
css: ["~/assets/css/_main.css"],
|
|
components: {
|
|
dirs: [
|
|
{ path: "~/components/nodes", global: true },
|
|
{ path: "~/components", pathPrefix: false },
|
|
],
|
|
},
|
|
ui: { colorMode: false },
|
|
|
|
graphql: {
|
|
client: {
|
|
cache: {
|
|
keyVersion: version,
|
|
},
|
|
},
|
|
server: {
|
|
schema: [{ type: "remote", endpoint: `${wpUrl}/graphql` }],
|
|
},
|
|
},
|
|
|
|
svgo: {
|
|
autoImportPath: "~/assets/svg/",
|
|
componentPrefix: "Svg",
|
|
defaultImport: "component",
|
|
},
|
|
|
|
vite: {
|
|
optimizeDeps: {
|
|
include: ["@vue/devtools-core", "@vue/devtools-kit", "zod"],
|
|
},
|
|
},
|
|
});
|