This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
182 lines (182 loc) · 6.12 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
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
177
178
179
180
181
182
export default {
// //////////////////////////////////////////// Static Site Generation Options
// ---------------------------------------------------------------------------
target: 'static',
// ///////////////////////////////////////////////////// Runtime Configuration
// ---------------------------------------------------------------------------
// ---------------------------------------------------------- [Runtime] Public
publicRuntimeConfig: {
nodeEnv: process.env.NODE_ENV,
serverEnv: process.env.SERVER_ENV,
seo: {
siteName: 'AU Nuxt Static Boilerplate',
siteUrl: 'https://au-nuxt-static.on.fleek.co'
},
redirects: []
},
// --------------------------------------------------------- [Runtime] Private
privateRuntimeConfig: {},
// /////////////////////////////////////////////////////////// Server & Render
// ---------------------------------------------------------------------------
server: {
port: 9100,
host: process.env.NODE_ENV !== 'development' ? '0.0.0.0' : 'localhost'
},
render: {
bundleRenderer: {
runInNewContext: false
}
},
// /////////////////////////////////////////////////////// Headers of the Page
// ---------------------------------------------------------------------------
head: {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon/favicon-96x96.png', sizes: '96x96' }
]
},
// ////////////////////////////////////////// Customize the progress-bar color
// ---------------------------------------------------------------------------
loading: {
color: '#000000',
height: '4px'
},
// /////////////////////////////////////////////////////////// Global CSS/SCSS
// ---------------------------------------------------------------------------
css: [
'~/assets/scss/main.scss'
],
styleResources: {
scss: [
'~/assets/scss/variables.scss'
]
},
// /////////////////////////////////////////////////////// Nuxt.js Dev Modules
// ---------------------------------------------------------------------------
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module',
// Doc: https://github.com/nuxt-community/moment-module#readme
'@nuxtjs/moment',
// Doc: https://google-analytics.nuxtjs.org
'@nuxtjs/google-analytics'
],
// /////////////////////////////////////////////////////////// Nuxt.js Modules
// ---------------------------------------------------------------------------
modules: [
// Doc: https://github.com/nuxt-community/style-resources-module
'@nuxtjs/style-resources',
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
// Doc: https://sitemap.nuxtjs.org
'@nuxtjs/sitemap',
// Doc: https://github.com/nuxt-community/gtm-module#nuxtjsgtm
'@nuxtjs/gtm',
// Doc: https://content.nuxtjs.org
'@nuxt/content',
// AU internal components module
'~/modules/zero'
],
// ///////////////////////////////////////////////////// [Module] Nuxt-content
// ---------------------------------------------------------------------------
content: {
markdown: {
prism: {
theme: false
}
}
},
// ///////////////////////////////////////////////////////////// [Module] Zero
// ---------------------------------------------------------------------------
zero: {
core: {
include: true,
toaster: {
display: 10,
timeout: 5000
}
},
filters: {
include: false
},
pagination: {
include: false
}
},
// ///////////////////////////////////////////////////////// [Module] MomentJS
// ---------------------- Doc: https://github.com/nuxt-community/moment-module
moment: {
timezone: true,
defaultTimezone: 'UTC'
},
// ///////////////////////////////////////////////////////////// [Module] Zero
// ------------------------------------------- Dox: https://sitemap.nuxtjs.org
sitemap: {
hostname: 'https://au-nuxt-static.on.fleek.co'
},
// //////////////////////////////////////////////////////////// [Module] Axios
// -------------------------------------- See https://axios.nuxtjs.org/options
axios: {
},
// ///////////////////////////////////////////////// [Module] Google Analytics
// ---------------------------------------------------------------------------
googleAnalytics: {
// GTM used in favor of GA package
checkDuplicatedScript: true
// id: process.env.SERVER_ENV === 'production' ? process.env.GAID : false
},
// ////////////////////////////////////////////////////////////// [Module] GTM
// ------------------------- Dox: https://github.com/nuxt-community/gtm-module
gtm: {
// alternatively, the GTM ID can be specified as an environment variable
id: '',
pageTracking: true
},
// /////////////////////////////////// Plugins to load before mounting the App
// ---------------------------------------------------------------------------
plugins: [],
// /////////////////////////////////////////////////////// Router + Middleware
// ---------------------------------------------------------------------------
generate: {
fallback: '404.html'
},
// /////////////////////////////////////////////////////// Build configuration
// ------------------------------------------------ Extend webpack config here
build: {
babel: {
// needed to run @nuxt/storybook
// envName: server, client, modern
presets ({ envName }) {
return [
[
'@nuxt/babel-preset-app',
{
corejs: { version: 3 }
}
]
]
}
},
// ---------------------------------------------------------- Hot Middleware
hotMiddleware: {
client: {
overlay: false
}
},
// -------------------------------------------------------------- Extensions
extend (config, ctx) {
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader'
})
}
},
storybook: {
parameters: {
layout: 'fullscreen'
}
}
}