This repository has been archived by the owner on Jun 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
69 lines (66 loc) · 1.94 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
import { Configuration } from '@nuxt/types'
import pkg from './package.json'
/* eslint-disable no-process-env */
const {
FIREBASE_PROJECT_ID,
FIREBASE_API_KEY,
FIREBASE_MESSAGING_SENDER_ID,
FIREBASE_APP_ID
} = process.env
/* eslint-enable no-process-env */
const projectId = FIREBASE_PROJECT_ID || 'ddradar-staging'
const isDevelopment = projectId === 'ddradar-staging'
const configration: Configuration = {
mode: 'spa',
/** Headers of the page */
head: {
title: 'DDRadar',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{
rel: 'canonical',
href: `http://${isDevelopment ? 'staging.' : ''}ddradar.app/`
}
]
},
/** Customize the progress-bar color */
loading: { color: '#fff' },
/** Global CSS */
css: ['~/assets/css/styles.scss'],
/** Plugins to load before mounting the App */
plugins: ['~/plugins/firebase.ts'],
/** Nuxt.js dev-modules */
buildModules: ['@nuxtjs/eslint-module', '@nuxt/typescript-build'],
/** Nuxt.js modules */
modules: [
// Doc: https://buefy.org/documentation
['nuxt-buefy', { css: false }],
'@nuxtjs/pwa'
],
pwa: {
manifest: {
name: 'DDRadar',
description: pkg.description,
theme_color: '#8c67ef',
lang: 'ja',
display: 'standalone',
scope: '/',
start_url: '/'
}
},
env: {
apiKey: FIREBASE_API_KEY || 'AIzaSyC_z8VvdgZDibPFZYT1W0-xrmkJiU6PmRw',
authDomain: `${projectId}.firebaseapp.com`,
databaseURL: `https://${projectId}.firebaseio.com`,
projectId,
storageBucket: `${projectId}.appspot.com`,
messagingSenderId: FIREBASE_MESSAGING_SENDER_ID || '922209395211',
appId: FIREBASE_APP_ID || '1:922209395211:web:04e36178df0443c6cf9d0e'
}
}
export default configration