import svgLoader from 'vite-svg-loader'
import { defineNuxtConfig, type NuxtConfig } from 'nuxt/config'
import type { ModuleOptions } from 'nuxt-graphql-request'
import {
PUBLIC_GRAPHQL_ENDPOINT,
} from './utils/constants'
const IS_PRODUCTION = process.env.CF_PAGES_BRANCH === 'production'
const runtimeConfig: { public: any } = {
public: {},
}
// Global CSS: https://go.nuxtjs.dev/config-css
const css = ['~/assets/main.scss']
const sourcemap = {
server: process.env.CONTEXT === 'production',
client: process.env.CONTEXT === 'production',
}
const modules: any[] = ['@nuxtjs/tailwindcss', 'nuxt-graphql-request']
const tailwindcss = {
exposeConfig: true,
viewer: false,
configPath: './tailwind.config.ts',
}
const graphql: Partial<ModuleOptions> = {
clients: {
default: {
endpoint: PUBLIC_GRAPHQL_ENDPOINT,
options: {
requireCredentials: false,
} as any,
},
authenticatedClient: {
endpoint: GRAPHQL_ENDPOINT,
options: {
requireCredentials: true,
} as any,
},
},
}
interface CustomNuxtConfig extends NuxtConfig {
eslint?: any
}
const config: CustomNuxtConfig = {
compatibilityDate: '2024-04-03',
// app: { head },
typescript: {
strict: false,
},
devServerHandlers: [],
vite: {
plugins: [svgLoader({ svgo: false })],
define: {
__DEV__: !IS_PRODUCTION,
global: 'window',
},
},
runtimeConfig,
sourcemap,
modules,
css,
tailwindcss,
ignore: ['playwright/**/*.spec.*', 'playwright-report/*', '.idea/*'],
graphql,
experimental: {
// externalVue: false,
defaults: {
nuxtLink: {
trailingSlash: 'append',
activeClass: 'nuxt-link-active',
exactActiveClass: 'nuxt-link-exact-active',
},
},
},
}
export default defineNuxtConfig(config)
import svgLoader from 'vite-svg-loader'
import { defineNuxtConfig, type NuxtConfig } from 'nuxt/config'
import type { ModuleOptions } from 'nuxt-graphql-request'
import {
PUBLIC_GRAPHQL_ENDPOINT,
} from './utils/constants'
const IS_PRODUCTION = process.env.CF_PAGES_BRANCH === 'production'
const runtimeConfig: { public: any } = {
public: {},
}
// Global CSS: https://go.nuxtjs.dev/config-css
const css = ['~/assets/main.scss']
const sourcemap = {
server: process.env.CONTEXT === 'production',
client: process.env.CONTEXT === 'production',
}
const modules: any[] = ['@nuxtjs/tailwindcss', 'nuxt-graphql-request']
const tailwindcss = {
exposeConfig: true,
viewer: false,
configPath: './tailwind.config.ts',
}
const graphql: Partial<ModuleOptions> = {
clients: {
default: {
endpoint: PUBLIC_GRAPHQL_ENDPOINT,
options: {
requireCredentials: false,
} as any,
},
authenticatedClient: {
endpoint: GRAPHQL_ENDPOINT,
options: {
requireCredentials: true,
} as any,
},
},
}
interface CustomNuxtConfig extends NuxtConfig {
eslint?: any
}
const config: CustomNuxtConfig = {
compatibilityDate: '2024-04-03',
// app: { head },
typescript: {
strict: false,
},
devServerHandlers: [],
vite: {
plugins: [svgLoader({ svgo: false })],
define: {
__DEV__: !IS_PRODUCTION,
global: 'window',
},
},
runtimeConfig,
sourcemap,
modules,
css,
tailwindcss,
ignore: ['playwright/**/*.spec.*', 'playwright-report/*', '.idea/*'],
graphql,
experimental: {
// externalVue: false,
defaults: {
nuxtLink: {
trailingSlash: 'append',
activeClass: 'nuxt-link-active',
exactActiveClass: 'nuxt-link-exact-active',
},
},
},
}
export default defineNuxtConfig(config)