-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
nuxt.config.js
117 lines (116 loc) · 2.4 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
113
114
115
116
117
import path from 'path'
import compression from 'compression'
export default {
mode: 'unknown',
srcDir: __dirname,
server: {
port: 8000,
host: '0.0.0.0',
timing: {
total: true
}
},
vueMeta: {
ssrAppId: 'test-ssr-app-id'
},
router: {
base: '/test/',
middleware: 'noop',
scrollBehavior (to, from, savedPosition) {
return { x: 0, y: 0 }
},
extendRoutes (routes) {
return [
...routes,
{
name: 'about-bis',
path: '/about-bis',
component: '~/pages/about.vue',
meta: { text: 'test-meta' }
},
{
path: '/redirect/about-bis',
redirect: '/about-bis'
},
{
path: '/not-existed'
}
]
}
},
modulesDir: [path.join(__dirname, '..', '..', '..', 'node_modules')],
pageTransition: 'test',
layoutTransition: 'test',
loadingIndicator: 'circle',
extensions: 'ts',
plugins: [
'~/plugins/test',
'~/plugins/doubled',
{ src: '~/plugins/test.plugin', mode: 'abc' },
'~/plugins/test.client',
'~/plugins/test.server',
{ src: '~/plugins/only-client.js', ssr: false }
],
loading: '~/components/loading',
env: {
bool: true,
num: 23,
string: 'Nuxt.js',
object: {
bool: false,
string: 'ok',
num2: 8.23,
obj: {
again: true
}
}
},
build: {
publicPath: '/orion/',
cssSourceMap: true,
parallel: true,
analyze: {
analyzerMode: 'disabled',
generateStatsFile: true,
logLevel: 'error'
},
styleResources: {
css: './assets/pre-process.css'
},
babel: {
presets ({ isServer }) {
return null // Coverage: Return null, so defaults will be used.
}
},
transpile: 'vue-test',
extend (config, options) {
return Object.assign({}, config, {
devtool: 'source-map'
})
}
},
css: [
'~/assets/app.pcss',
'~/assets/app.sass'
],
render: {
csp: true,
http2: {
push: true,
shouldPush: (file, type) => type === 'script'
},
bundleRenderer: {
shouldPreload: (file, type) => {
return ['script', 'style', 'font'].includes(type)
}
},
compressor: function damn (...args) { return compression({ threshold: 9 })(...args) },
static: {
maxAge: '1y'
}
},
globalName: 'noxxt',
globals: {
id: 'custom-nuxt-id'
}
}