forked from Tokyo-Metro-Gov/covid19
-
Notifications
You must be signed in to change notification settings - Fork 23
/
nuxt.config.ts
176 lines (174 loc) · 4.42 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import { Configuration } from '@nuxt/types'
import i18n from './nuxt-i18n.config'
const purgecss = require('@fullhuman/postcss-purgecss')
const autoprefixer = require('autoprefixer')
const config: Configuration = {
mode: 'universal',
/*
** Headers of the page
*/
head: {
htmlAttrs: {
prefix: 'og: http://ogp.me/ns#'
},
titleTemplate: '%s | 大阪府 新型コロナウイルス感染症対策サイト',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content:
'当サイトは新型コロナウイルス感染症(COVID-19)に関する最新情報を提供するために、大阪府が開設したものです。'
},
{
hid: 'og:site_name',
property: 'og:site_name',
content: '大阪府 新型コロナウイルス感染症対策サイト'
},
{ hid: 'og:type', property: 'og:type', content: 'website' },
{
hid: 'og:url',
property: 'og:url',
content: 'https://covid19-osaka.info/'
},
{
hid: 'og:title',
property: 'og:title',
content: '大阪府 新型コロナウイルス感染症対策サイト'
},
{
hid: 'og:description',
property: 'og:description',
content:
'当サイトは新型コロナウイルス感染症(COVID-19)に関する最新情報を提供するために、大阪府が開設したものです。'
},
{
hid: 'og:image',
property: 'og:image',
content: 'https://covid19-osaka.info/ogp.png'
},
{
hid: 'twitter:card',
name: 'twitter:card',
content: 'summary_large_image'
},
{
hid: 'twitter:image',
name: 'twitter:image',
content: 'https://covid19-osaka.info/ogp.png'
},
{
hid: 'apple-mobile-web-app-title',
name: 'apple-mobile-web-app-title',
content: '大阪府コロナウィルス対策サイト'
}
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'apple-touch-icon', href: '/apple-touch-icon-precomposed.png' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: ['~assets/global.scss'],
/*
** Plugins to load before mounting the App
*/
plugins: [
{
src: '@/plugins/vue-chart.ts',
ssr: true
},
{
src: '@/plugins/vuetify.ts',
ssr: true
}
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxtjs/vuetify',
'@nuxt/typescript-build',
'@nuxtjs/google-analytics'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/pwa',
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv',
['nuxt-i18n', i18n],
'nuxt-svg-loader',
'nuxt-purgecss',
['vue-scrollto/nuxt', { duration: 1000, offset: -72 }]
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {},
/*
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module
*/
vuetify: {
customVariables: ['~/assets/variables.scss'],
defaultAssets: {
icons: false
}
},
googleAnalytics: {
id: 'UA-160707556-1'
},
build: {
postcss: {
plugins: [
autoprefixer({ grid: 'autoplace' }),
purgecss({
content: [
'./pages/**/*.vue',
'./layouts/**/*.vue',
'./components/**/*.vue',
'./node_modules/vuetify/dist/vuetify.js',
'./node_modules/vue-spinner/src/ScaleLoader.vue'
],
whitelist: ['html', 'body', 'nuxt-progress', 'DataCard'],
whitelistPatterns: [/(col|row)/]
})
]
}
// https://ja.nuxtjs.org/api/configuration-build/#hardsource
// hardSource: process.env.NODE_ENV === 'development'
},
manifest: {
name: '大阪府 新型コロナウイルス感染症対策サイト',
theme_color: '#364c97',
background_color: '#ffffff',
display: 'standalone',
Scope: '/',
start_url: '/',
splash_pages: null
},
generate: {
fallback: true
},
// /*
// ** hot read configuration for docker
// */
watchers: {
webpack: {
poll: true
}
}
}
export default config