-
Notifications
You must be signed in to change notification settings - Fork 4
/
nuxt.config.js
97 lines (87 loc) · 1.95 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
require('dotenv').config()
const polyfills = [
'Promise',
'Object.assign',
'Object.values',
'Array.prototype.find',
'Array.prototype.findIndex',
'Array.prototype.includes',
'String.prototype.includes',
'String.prototype.startsWith',
'String.prototype.endsWith'
]
export default {
mode: 'spa',
dev: true,
srcDir: 'client/',
env: {
apiUrl: process.env.API_URL + process.env.API_VERSION || 'http://localhost/api',
appName: process.env.APP_NAME || 'Anchor',
appLocale: process.env.APP_LOCALE || 'en'
},
/*
** Headers of the page
*/
head: {
title: process.env.APP_NAME,
titleTemplate: '%s - ' + process.env.APP_NAME,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
script: [
{ src: `https://cdn.polyfill.io/v2/polyfill.min.js?features=${polyfills.join(',')}` }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#e9311d' },
router: {
base: '/',
middleware: ['locale', 'check-auth']
},
/*
** Global CSS
*/
css: [
{ src: '~assets/sass/app.scss', lang: 'scss' },
{ src: '@fortawesome/fontawesome/styles.css', lang: 'css' },
{ src: '@icon/dashicons/dashicons.css', lang: 'css' }
],
/*
** Plugins to load before mounting the App
*/
plugins: [
'~components/global',
'~plugins/helloworld',
'~plugins/i18n',
'~plugins/axios',
'~plugins/vform',
'~plugins/fontawesome',
'~plugins/nuxt-client-init',
{ src: '~plugins/bootstrap', ssr: false }
],
/*
** Nuxt.js modules
*/
modules: [
'@nuxtjs/router',
'~/modules/spa'
],
/*
** Build configuration
*/
build: {
extractCSS: true,
/*
** You can extend webpack config here
*/
extend(config, ctx) {
}
}
}