-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathnuxt.config.js
66 lines (65 loc) · 1.69 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
const resolve = require('path').resolve;
module.exports = {
/*
** Headers of the page
*/
head: {
title: 'Lewis1990@Amoy - A Front-end developer passionate about coding and sharing!',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' },
{ name: "360_ssp_verify", content: "8710009981daf8cb6f7c196e691855e5" }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: "stylesheet", href: "//at.alicdn.com/t/font_569133_ezjz665h0xljif6r.css"} // iconfont
]
},
css: [
"~/assets/style/common.css",
"~/assets/style/markdown.css", // markdown转html样式
"~/assets/highlight-style/solarized-light.css" // html代码高亮样式
],
/*
** Customize the progress bar color
*/
plugins: [
{ src: "~plugins/client_site/index.js", ssr: false },
{ src: "~plugins/server_site/index.js", ssr: true }
],
loading: { color: '#3B8070' },
/*
** Build configuration
*/
router: {
extendRoutes (routes) {
routes.push({
name: 'post',
path: '/post/:id/:slug',
component: resolve(__dirname, 'pages/post/_id.vue')
})
}
},
build: {
externals: {
window: "window"
},
/*
** 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)/
})
}
externals: {
window: "window"
}
}
}
}