nuxt-prawo-jazdy/nuxt.config.ts
NetMan 625c1013da Nuxt3=>4, spa-loader, css shenanigans...:
...css shenanigans: daisyui may have had a breaking change at 5.3.0, it wrecks the ui here, as tailwind forces its own styles over daisyuis overrides, for now staying at ~5.2.5, for good measure also @nuxtjs/tailwindcss stays at ^6.13.2 (6.13.2 in pnpmlock) - this may be, because (but i'm not sure) @nuxtjs/tailwind is tailwind3 and not tailwind4?

Nuxt3=>4 migration:
also changed nuxtimage settings, as the docs have been fixed, path changes, etc
2025-12-17 21:33:36 +01:00

61 lines
1.3 KiB
TypeScript

// https://nuxt.com/docs/api/configuration/nuxt-config
import 'dotenv/config';
export default defineNuxtConfig({
modules: [
'@nuxtjs/tailwindcss',
'@nuxt/fonts',
'@pinia/nuxt',
'pinia-plugin-persistedstate/nuxt',
'@nuxt/eslint',
'@nuxt/image',
'@nuxtjs/i18n',
],
ssr: false,
imports: {
dirs: ['types/*.ts', 'store/*.ts', 'types/**/*.ts'],
},
devtools: { enabled: true },
css: ['~/assets/css/tailwind.css'],
runtimeConfig: {
public: {
cdn_url: process.env.CDN_URL,
},
},
routeRules: {
'/': { prerender: true },
},
compatibilityDate: '2025-12-17',
eslint: {
config: {
stylistic: {
indent: 2,
semi: true,
quotes: 'single',
jsx: false,
},
},
},
i18n: {
locales: [
{ code: 'pl', language: 'pl-PL', file: 'pl.json' },
{ code: 'en', language: 'en-GB', file: 'en.json' },
{ code: 'de', language: 'de-DE', file: 'de.json' },
{ code: 'ua', language: 'uk-UK', file: 'ua.json' },
],
defaultLocale: 'pl',
},
image: {
providers: {
selfhost: {
name: 'selfhost',
provider: '~~/providers/selfhost.ts',
options: {
baseUrl: process.env.CDN_URL,
},
},
},
provider: 'selfhost',
},
tailwindcss: { exposeConfig: true },
});