-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
123 lines (108 loc) · 3.6 KB
/
nuxt.config.ts
File metadata and controls
123 lines (108 loc) · 3.6 KB
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
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
import dev from './lib/config/development';
import stg from './lib/config/staging';
import prod from './lib/config/production';
import { Environments } from './lib/values/general.values';
const env = process.env.ENV ? process.env.ENV : process.env.NODE_ENV;
let CONFIG = dev;
if (env === Environments.prod) {
CONFIG = prod;
} else if (env === Environments.stg) {
CONFIG = stg;
}
const meta = {
title: 'PINK PASS',
description:
'The Pink Pass grants access to the Pink gaming tournament, enabling participants to earn PINK Points. PINK is a Polkadot meme coin issued on AssetHub.',
url: 'https://nft.dotispink.xyz/',
image: '/images/super-gavin.jpg',
};
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
runtimeConfig: {
public: {
ENV: env || Environments.dev,
...CONFIG,
},
},
components: ['~/components/general', '~/components/parts'],
imports: {
dirs: ['composables/', 'composables/stores/**', 'lib/utils/**'],
},
modules: [
['@nuxtjs/tailwindcss', { cssPath: '~/assets/styles/index.css' }],
'@pinia/nuxt',
'@pinia-plugin-persistedstate/nuxt',
'@vueuse/nuxt',
'nuxt-icons',
'@nuxtjs/google-fonts',
],
vite: {
plugins: [
AutoImport({
imports: [
{
'naive-ui': ['useDialog', 'useMessage', 'useNotification', 'useLoadingBar'],
},
],
}),
Components({
resolvers: [NaiveUiResolver()],
}),
],
optimizeDeps: {
include:
// must use NODE_ENV (to build production version with dev config)
process.env.NODE_ENV === Environments.dev
? ['naive-ui', 'vueuc', 'date-fns-tz/esm/formatInTimeZone']
: [],
},
},
build: {
transpile:
// must use NODE_ENV (to build production version with dev config)
process.env.NODE_ENV === Environments.prod
? ['naive-ui', 'vueuc', '@css-render/vue3-ssr', '@juggle/resize-observer']
: ['@juggle/resize-observer'],
},
ssr: false,
app: {
head: {
htmlAttrs: { lang: 'en' },
bodyAttrs: { id: 'kalm' },
title: meta.title,
titleTemplate: `%s - ${meta.title}`,
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no',
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 },
],
link: [{ rel: 'icon', type: 'image/png', href: '/images/favicon.png' }],
},
},
googleFonts: {
useStylesheet: true,
display: 'swap',
download: false,
families: {
Inter: {
wght: [400],
},
},
},
devtools: { enabled: true },
});