-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.ts
64 lines (62 loc) · 1.61 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
import { defineNuxtConfig } from '@nuxt/bridge'
import { generalOg, twitterOg } from './app/utils/og.constants'
import { preloadImages } from './app/utils/preload.constants'
import { conferenceTitle, urlBasePath } from './app/utils/constants'
import { isProd } from './app/utils/environment.constants'
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
export default defineNuxtConfig({
srcDir: 'app/',
router: {
base: urlBasePath,
},
app: {
buildAssetsDir: '/_nuxt/',
baseURL: isProd ? '/2022/' : '/',
},
target: 'static',
css: ['~/assets/main.scss'],
head: {
title: conferenceTitle,
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no' },
...generalOg(),
...twitterOg(),
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'icon', sizes: '180x180', href: '/icon/apple-touch-icon.png' },
...preloadImages(),
],
htmlAttrs: {
lang: 'ja',
},
bodyAttrs: {
class: [isProd ? 'prod-body' : 'body'],
},
},
buildModules: ['@nuxtjs/device', '@nuxtjs/svg', '@nuxtjs/tailwindcss'],
modules: [
[
'@nuxtjs/google-gtag', // GA3
{
id: process.env.NUXT_GTAG_ID,
debug: !isProd,
},
],
],
bridge: {
meta: true,
},
generate: {
dir: 'dist/2022',
},
publicRuntimeConfig: {
kokuryuFontId: process.env.NUXT_KOKURYU_FONT_ID,
gtagId: process.env.NUXT_GTAG_ID,
newtCdnToken: process.env.NUXT_NEWT_CDN_TOKEN,
newtSpaceUid: process.env.NUXT_NEWT_SPACE_UID,
},
build: {
extractCSS: true,
},
})