-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnuxt.config.js
128 lines (124 loc) · 3.57 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
require('dotenv').config()
const baseName = '診断チャートメーカー'
const baseDesc = 'フローチャート形式の診断を簡単につくれるサービスです'
const baseUrl = process.env.BASE_URL || 'http://localhost:3000'
export default {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: '診断チャートメーカー',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: baseDesc
},
{ hid: 'og:site_name', property: 'og:site_name', content: baseName },
{ hid: 'og:type', property: 'og:type', content: 'article' },
{ hid: 'og:url', property: 'og:url', content: baseUrl },
{ hid: 'og:title', property: 'og:title', content: baseName },
{ hid: 'og:description', property: 'og:description', content: baseDesc },
{
hid: 'og:image',
property: 'og:image',
content: baseUrl + '/images/ogp.png'
},
{ property: 'article:publisher', content: 'FacebookURL' },
{ property: 'fb:app_id', content: 'FacebookAppID' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:site', content: '@retoruto_carry' }
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: ['@mdi/font/css/materialdesignicons.css'],
/*
** Plugins to load before mounting the App
*/
plugins: [
'~/plugins/firebase.ts',
{ src: '~/plugins/vue-tags-input.js', mode: 'client' }
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxt/typescript-build',
// Doc: https://github.com/nuxt-community/stylelint-module
'@nuxtjs/stylelint-module',
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
'@nuxtjs/tailwindcss',
[
'@nuxtjs/google-analytics',
{
id: 'UA-55008158-13'
}
]
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/pwa',
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv'
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {},
env: {
BASE_URL: process.env.BASE_URL,
FIREBASE_API_KEY: process.env.FIREBASE_API_KEY,
FIREBASE_AUTH_DOMAIN: process.env.FIREBASE_AUTH_DOMAIN,
FIREBASE_DATABASE_URL: process.env.FIREBASE_DATABASE_URL,
FIREBASE_PROJECT_ID: process.env.FIREBASE_PROJECT_ID,
FIREBASE_STORAGE_BUCKET: process.env.FIREBASE_STORAGE_BUCKET,
FIREBASE_MESSAGING_SENDER_ID: process.env.FIREBASE_MESSAGING_SENDER_ID,
FIREBASE_APP_ID: process.env.FIREBASE_APP_ID,
FIREBASE_MEASUREMENT_ID: process.env.FIREBASE_MEASUREMENT_ID || ''
},
/*
** Build configuration
*/
build: {
babel: {
presets({ isServer }) {
return [
[
require.resolve('@nuxt/babel-preset-app'),
// require.resolve('@nuxt/babel-preset-app-edge'), // For nuxt-edge users
{
buildTarget: isServer ? 'server' : 'client',
corejs: { version: 3 }
}
]
]
}
},
/*
** You can extend webpack config here
*/
extend(config, { isServer }) {
if (isServer) {
config.externals = {
'@firebase/app': 'commonjs @firebase/app',
'@firebase/firestore': 'commonjs @firebase/firestore'
}
}
}
}
}