-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
109 lines (96 loc) · 3.04 KB
/
nuxt.config.js
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
const env = process.env.NODE_ENV
/* eslint-disable nuxt/no-cjs-in-config */
// export defaultだとデプロイ時にエラーが発生するため、module.exportsを使う
module.exports = {
// Global page headers (https://go.nuxtjs.dev/config-head)
head: {
title: 'AtCoder Rivals',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'google-site-verification', content: 'itr_bGQElJ2_ARd6JeMvfgBGivGilea9-8hel4SkilE' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: 'anonymous' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Quicksand:wght@500&display=swap' }
]
},
// Global CSS (https://go.nuxtjs.dev/config-css)
css: [
],
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [
'@/plugins/axios',
'@/plugins/dayjs',
{ src: '~/plugins/infiniteloading', ssr: false },
'@/plugins/globalMixin'
],
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
// https://go.nuxtjs.dev/typescript
'@nuxt/typescript-build'
],
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [
// https://go.nuxtjs.dev/bootstrap
'bootstrap-vue/nuxt',
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
'@nuxtjs/pwa',
'@nuxtjs/firebase'
],
firebase: {
config: {
apiKey: 'AIzaSyDYzrKzNdQlPYQgg0ESdW-dmV94xiycndY',
authDomain: 'atcoder-rivals.firebaseapp.com',
projectId: 'atcoder-rivals',
storageBucket: 'atcoder-rivals.appspot.com',
messagingSenderId: '385533054515',
appId: '1:385533054515:web:58443f89461172e55e9d46',
measurementId: 'G-0R3T6EQTGR',
databaseURL: ''
},
services: {
auth: {
persistence: 'local',
initialize: {
onAuthStateChangedAction: 'onAuthStateChangedAction'
},
ssr: true
},
analytics: {
collectionEnabled: true
}
}
},
pwa: {
meta: false,
icon: false,
workbox: {
importScripts: [
'/firebase-auth-sw.js'
],
// by default the workbox module will not install the service worker in dev environment to avoid conflicts with HMR
// only set this true for testing and remember to always clear your browser cache in development
dev: env === 'development'
}
},
// Axios module configuration (https://go.nuxtjs.dev/config-axios)
axios: {
baseURL: env === 'production' ? 'https://atcoder-rivals.herokuapp.com/api' : 'http://localhost:3000/api'
},
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {
babel: {
compact: true
}
},
server: {
port: 3001
}
}