forked from b3log/pipe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.js
More file actions
73 lines (72 loc) · 1.61 KB
/
Copy pathnuxt.config.js
File metadata and controls
73 lines (72 loc) · 1.61 KB
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
const env = require(`../pipe.json`)
module.exports = {
env,
/*
** Headers of the page
*/
head: {
title: 'Pipe',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'robots', content: 'none' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'manifest', href: `${env.Server}/theme/js/manifest.json` }
]
},
/*
** Customize the progress bar color
*/
loading: { color: '#4a4a4a' },
css: [
'vuetify/dist/vuetify.min.css',
'~assets/scss/main.scss'
],
plugins: [
{ src: '~/plugins/axios.js', ssr: false },
{ src: '~/plugins/init.js', ssr: false },
{ src: '~/plugins/nuxt-client-init.js', ssr: false }
],
mode: 'spa',
/*
** Build configuration
*/
build: {
vendor: ['babel-polyfill', 'vue-i18n', '~/assets/symbol.js', 'axios', 'vuetify'],
publicPath: (env.StaticServer || env.Server) + '/console/dist/',
extractCSS: true,
ssr: false,
/*
** Run ESLint on save
*/
extend (config, ctx) {
if (ctx.dev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
},
router: {
middleware: ['initialized', 'authenticated']
},
modules: ['@nuxtjs/proxy'],
proxy: {
'/api': {
target: env.Server,
changeOrigin: true
},
'/mock': {
target: env.MockServer,
changeOrigin: true,
pathRewrite: {
'^/mock/': ''
}
}
}
}