forked from JohnMica/pcd-nuxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
112 lines (112 loc) · 2.65 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
export default {
target: 'static',
head: {
title: 'PublicCode Directory',
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1, viewport-fit=cover',
},
{
hid: 'description',
name: 'description',
content:
'The federated DataBase of Open Source Software used by public institutions',
},
{
hid: 'keywords',
name: 'keywords',
content:
'federated, DataBase, Open Source Software, public institutions',
},
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/img/logo.png' }],
bodyAttrs: {
class: 'is-grid',
},
},
css: ['~/assets/scss/app'],
plugins: [
'~/plugins/truncate',
'~/plugins/capitalize',
{ src: '~/plugins/validate.js', mode: 'client' },
],
pwa: {
icon: {
source: './static/img/logo.png',
sizes: [64, 120, 144, 152, 192, 384, 512],
},
manifest: {
name: 'PublicCode Directory',
short_name: 'PCD',
description:
'The federated DataBase of Open Source Software used by public institutions',
lang: 'en',
theme_color: '#4DBA87',
useWebManifestExtension: false,
startUrl: '/',
},
},
telemetry: true,
components: true,
buildModules: ['@nuxt/components', '@nuxt/typescript-build'],
modules: [
'nuxt-buefy',
'@nuxtjs/axios',
'@nuxtjs/pwa',
'nuxt-leaflet',
'@nuxt/content',
],
modern: process.env.NODE_ENV === 'production',
generate: {
fallback: true,
},
render: {
http2: {
push: false,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
pushAssets: (req, res, publicPath, preloadFIles) =>
preloadFIles
.filter((f) => f.asType === 'script' && f.file === 'runtime.js')
.map((f) => `<${publicPath}${f.file}>; rel=preload; as=${f.asType}`),
},
},
axios: {},
content: {
// nestedProperties: ['author.name'],
markdown: {
// https://github.com/remarkjs/remark-external-links#options
remarkExternalLinks: {
target: '_self',
rel: 'nofollow noopener',
},
},
},
build: {
babel: {
presets: [
[
'@nuxt/babel-preset-app',
{
corejs: 3,
},
],
],
},
transpile: ['vee-validate/dist/rules'],
},
extend(config, ctx) {
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/,
options: {
fix: true,
},
})
}
},
}