This repository has been archived by the owner on Oct 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
nuxt.config.js
102 lines (95 loc) · 2.17 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
const path = require('path')
const settings = require(path.resolve(__dirname, 'config.json'))
const routes = require(path.resolve(__dirname, 'assets', 'data', 'routes.json'))
module.exports = {
/*
** Headers of the page
*/
head: {
title: "Battle for the Net",
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
css: [
'normalize.css/normalize.css',
'~/assets/css/main.scss'
],
modules: [
'nuxt-sass-resources-loader'
],
sassResources: [
'~/assets/css/_variables.scss'
],
// render: {
// bundleRenderer: {
// shouldPreload: (file, type) => {
// return ['script', 'style', 'font'].includes(type)
// }
// }
// },
/*
** Customize the progress bar color
*/
loading: { color: '#3B8070' },
/*
** Build configuration
*/
build: {
/*
** Run ESLint on save
*/
extend (config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
config.module.rules.push({
test: /\.(yaml|yml)$/,
// include: path.resolve('data'),
loader: 'json-loader!yaml-loader',
})
if (!isDev) {
config.externals = {
'showdown': 'showdown'
}
}
},
vendor: [
'axios',
'babel-polyfill'
],
babel: {
presets: [
['vue-app', {
useBuiltIns: true,
targets: { ie: 9, uglify: true }
}
]
]
},
},
plugins: [
'~/plugins/filters.js',
'~/plugins/components.js',
{ src: '~/plugins/analytics.js', ssr: false },
'~/plugins/org-rotation.js',
{ src: '~/plugins/sentry.js', ssr: false },
'~/plugins/i18n.js',
{ src: '~/plugins/hash-link-fix.js', ssr: false },
{ src: '~/plugins/shareprogress.js', ssr: false },
{ src: '~/plugins/ab-test-rotation.js', ssr: false }
],
generate: {
routes: routes,
interval: 100
}
}