forked from caresteouvert/caresteouvert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
100 lines (98 loc) · 2.05 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
import glob from 'glob';
import { resolve, basename } from 'path';
import FMMode from 'frontmatter-markdown-loader/mode';
const messages = {};
glob.sync('./locales/*.json' ).forEach((file) => {
const locale = basename(file, '.json');
messages[locale] = require(resolve(file));
});
export default {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' }
],
link: [
{ rel: 'icon', type: 'image/png', href: '/favicon.png' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
'./font/osm.css'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
{ src: '~/plugins/map', mode: 'client' },
{ src: '~/plugins/linkified' },
{ src: '~/plugins/url' }
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxtjs/vuetify',
],
/*
** Nuxt.js modules
*/
modules: [
['~/modules/i18n', { messages }]
],
/*
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module
*/
vuetify: {
treeShake: {
directives: ['Touch']
},
optionsPath: './vuetify.options.js',
defaultAssets: {
icons: false,
font: false
}
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, _ctx) {
config.module.rules.push(
{
test: /\.md$/,
loader: 'frontmatter-markdown-loader',
include: resolve(__dirname, 'articles'),
options: {
mode: [FMMode.VUE_COMPONENT]
}
}
)
}
},
router: {
extendRoutes(routes, resolve) {
const index = routes.findIndex(route => route.path === '/');
routes[index] = {
...routes[index],
path: '/:featuresAndLocation?'
};
routes[index].children[0].name = 'place';
}
}
}