-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.js
70 lines (68 loc) · 1.42 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
import webpack from 'webpack'
const routerBase = process.env.DEPLOY_ENV === 'GH_PAGES' ? {
base: '/vue-test/'
} : {}
export default {
head: {
title: 'VueTest',
titleTemplate: (value) => {
if (!value) return 'VueTest'
if (value.toLowerCase() === 'vuetest') return 'VueTest'
return `${value} | VueTest`
},
meta: [
{
charset: 'utf-8'
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'
},
{
hid: 'description',
name: 'description',
content: 'VueTest'
},
{
name: 'msapplication-TileColor',
content: '#da532c'
},
{
name: 'theme-color',
content: '#ffffff'
}
]
},
mode: 'spa',
srcDir: 'src/',
css: [
// 'normalize.css',
'~/assets/styles/index.scss'
],
build: {
plugins: [
new webpack.NormalModuleReplacementPlugin(
/element-ui[\/\\]lib[\/\\]locale[\/\\]lang[\/\\]zh-CN/,
'element-ui/lib/locale/lang/en'
)
]
},
plugins: [
'~/plugins/element-ui',
'~/plugins/bootstrap',
{ src: '~/plugins/persistedState', ssr: false }
],
modules: [
'~~/modules/typescript.js',
'@nuxtjs/style-resources'
],
styleResources: {
scss: [
'~/assets/styles/resources.scss'
]
},
router: {
middleware: ['i18n'],
...routerBase
}
}