-
Notifications
You must be signed in to change notification settings - Fork 3
/
nuxt.config.js
99 lines (98 loc) · 2.59 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
module.exports = {
// mode
mode: 'universal',
target: 'static',
/*
** Headers of the page
*/
head: {
title: 'Devices for LineageOS',
htmlAttrs: {
lang: 'en'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' },
{ name: 'msapplication-TileColor', content: '#00aba9' },
{ name: 'msapplication-config', content: '/browserconfig.xml' },
{ name: 'theme-color', content: '#ffffff' }
],
link: [
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' },
{ rel: 'icon', sizes: '32x32', type: 'image/png', href: '/favicon-32x32.png' },
{ rel: 'icon', sizes: '16x16', type: 'image/png', href: '/favicon-16x16.png' },
{ rel: 'manifest', href: '/site.webmanifest' },
{ rel: 'mask-icon', color: '#5bbad5', href: '/safari-pinned-tab.svg' },
{ rel: 'shortcut icon', href: '/favicon.ico' }
],
script: [
{ src: '/count.js', 'data-goatcounter': `https://${process.env.GOAT_COUNTER_CODE}.goatcounter.com/count`, async: true }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
{ src: 'ant-design-vue/dist/antd.less', lang: 'less' }
],
/*
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/antd-ui',
{ src: '@/plugins/inject-ww', ssr: false }
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module'
],
/*
** Nuxt.js modules
*/
modules: [],
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
config.output.globalObject = 'this'
if (isClient) { // web workers are only available client-side
config.module.rules.push({
test: /\.worker\.js$/, // this will pick up all .js files that ends with ".worker.js"
loader: 'worker-loader',
exclude: /(node_modules)/
})
}
},
loaders: {
less: {
lessOptions: {
javascriptEnabled: true,
modifyVars: {
'primary-color': '#167c80',
'link-color': '#167c80'
}
}
}
}
}
}