-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
142 lines (123 loc) · 3.56 KB
/
nuxt.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
import { getAppConfig } from './lib/utils';
const env = process.env.ENV || process.env.RUN_ENV || process.env.NODE_ENV;
const appConfig: ConfigInterface = getAppConfig(env);
const meta = {
lang: 'en',
title: 'Apillon - Web3 development platform.',
description: 'Robust infrastructure for developers. Few-click solutions for everyone else.',
url: appConfig.url,
image: `${appConfig.url}/apillon_og.jpg`,
twitter: '@apillon_io',
};
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
ssr: false,
typescript: { shim: false },
runtimeConfig: {
public: appConfig,
},
components: [
'~/components',
'~/components/general/',
'~/components/parts/',
'~/components/dashboard/',
],
modules: [
'@vueuse/nuxt',
'@pinia/nuxt',
'@pinia-plugin-persistedstate/nuxt',
'nuxt-icons',
'@nuxtjs/i18n',
'@nuxtjs/google-fonts',
['@nuxtjs/tailwindcss', { cssPath: '~/assets/css/tailwind.css' }],
],
vite: {
plugins: [
AutoImport({
imports: [
{
'naive-ui': ['useMessage'],
},
],
}),
Components({
resolvers: [NaiveUiResolver()],
}),
],
optimizeDeps: {
include: process.env.NODE_ENV === 'development' ? ['naive-ui'] : [],
},
},
imports: {
dirs: ['composables/', 'composables/stores/**', 'lib/**'],
},
nitro: {
compressPublicAssets: true,
},
app: {
head: {
htmlAttrs: {
lang: meta.lang,
},
title: meta.title,
titleTemplate: `%s - ${meta.title}`,
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
meta: [
{ name: 'format-detection', content: 'telephone=no' },
{ name: 'theme-color', content: '#070707' },
{ name: 'description', content: meta.description, hid: 'description' },
{ name: 'og:title', content: meta.title, hid: 'og:title' },
{ name: 'og:description', content: meta.description, hid: 'og:description' },
{ name: 'og:url', content: meta.url, hid: 'og:url' },
{ name: 'og:image', content: meta.image },
{ name: 'og:type', content: 'website' },
{ name: 'twitter:title', content: meta.title, hid: 'twitter:title' },
{ name: 'twitter:description', content: meta.description, hid: 'twitter:description' },
{ name: 'twitter:url', content: meta.url, hid: 'twitter:url' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:image', content: meta.image },
{ name: 'twitter:creator', content: meta.twitter },
{ name: 'twitter:site', content: meta.twitter },
],
link: [
{ rel: 'icon', type: 'image/png', href: '/favicon.png' },
{ rel: 'manifest', href: '/manifest.json' },
],
script: [],
},
},
i18n: {
lazy: true,
langDir: 'locales',
defaultLocale: 'en',
strategy: 'no_prefix',
compilation: { strictMessage: false, escapeHtml: false },
locales: [
{
code: 'en',
name: 'English',
file: 'en.json',
},
],
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_lang',
redirectOn: 'root',
},
},
googleFonts: {
useStylesheet: true,
display: 'swap',
download: true,
families: {
Inter: {
wght: [400, 700],
},
},
},
compatibilityDate: '2024-08-29',
});