105 lines
2.1 KiB
TypeScript
105 lines
2.1 KiB
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
|
|
import type { IAccountProvider } from '~/types/account'
|
|
|
|
const providers: { [key: string]: IAccountProvider } = {
|
|
/* google: {
|
|
name: 'Google',
|
|
icon: '',
|
|
color: 'neutral',
|
|
}, */
|
|
}
|
|
export default defineNuxtConfig({
|
|
|
|
/**
|
|
* @see https://v3.nuxtjs.org/api/configuration/nuxt.config#modules
|
|
*/
|
|
modules: ['@nuxt/ui', '@nuxt/image', '@pinia/nuxt', 'dayjs-nuxt', 'nuxt-security', '@nuxt/eslint'],
|
|
|
|
$development: {
|
|
ssr: true,
|
|
devtools: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
|
|
app: {
|
|
head: {
|
|
title: 'Laravel/Nuxt Boilerplate',
|
|
meta: [
|
|
{ charset: 'utf-8' },
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
],
|
|
link: [
|
|
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
|
|
],
|
|
},
|
|
},
|
|
|
|
css: [
|
|
'@/assets/css/main.css',
|
|
],
|
|
|
|
ui: {
|
|
icons: ['heroicons'],
|
|
},
|
|
|
|
/**
|
|
* @see https://v3.nuxtjs.org/guide/features/runtime-config#exposing-runtime-config
|
|
*/
|
|
runtimeConfig: {
|
|
apiLocal: process.env.API_LOCAL_URL,
|
|
public: {
|
|
apiBase: process.env.API_URL,
|
|
apiPrefix: '/api/v1',
|
|
storageBase: process.env.API_URL + '/storage/',
|
|
providers: {
|
|
...providers,
|
|
},
|
|
},
|
|
},
|
|
srcDir: 'nuxt/app',
|
|
|
|
routeRules: {
|
|
'auth/verify': { ssr: false },
|
|
},
|
|
|
|
future: {
|
|
compatibilityVersion: 4,
|
|
},
|
|
|
|
compatibilityDate: '2024-10-28',
|
|
|
|
dayjs: {
|
|
locales: ['en'],
|
|
plugins: ['relativeTime', 'utc', 'timezone'],
|
|
defaultLocale: 'en',
|
|
defaultTimezone: 'America/New_York',
|
|
},
|
|
|
|
eslint: {
|
|
config: {
|
|
stylistic: true,
|
|
},
|
|
},
|
|
|
|
image: {
|
|
domains: [
|
|
process.env.API_URL || 'http://127.0.0.1:8000',
|
|
],
|
|
alias: {
|
|
api: process.env.API_URL || 'http://127.0.0.1:8000',
|
|
},
|
|
},
|
|
|
|
security: {
|
|
headers: {
|
|
crossOriginEmbedderPolicy: 'unsafe-none',
|
|
crossOriginOpenerPolicy: 'same-origin-allow-popups',
|
|
contentSecurityPolicy: {
|
|
'img-src': ['\'self\'', 'data:', 'https://*', process.env.API_URL || 'http://127.0.0.1:8000'],
|
|
},
|
|
},
|
|
},
|
|
})
|