-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.js
76 lines (76 loc) · 2.09 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
module.exports = {
/*
** Headers of the page
*/
head: {
title: '禾苗数据可视化平台',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '禾苗数据可视化平台' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
script: [
{ src: 'http://api.map.baidu.com/getscript?v=2.0&ak=ZUONbpqGBsYGXNIYHicvbAbM' }
]
},
/*
** Global CSS
*/
css: [
'~assets/css/main.css',
'~assets/css/animate.css',
'~assets/css/theme/index.css',
'~assets/css/font-awesome/css/font-awesome.css'
],
/**
* Plugins
*/
plugins: [
'~plugins/axios',
'~plugins/moment',
{ src: '~plugins/ga.js', ssr: false }
],
/*
** Add axios globally
*/
//external_library
build: {
analyze: false,
vendor: ['axios', 'moment'],
babel: {
plugins: ['babel-plugin-transform-vue-jsx', 'babel-plugin-syntax-jsx', 'transform-async-to-generator', 'transform-runtime', ['component', [{
'libraryName': 'element-ui',
'styleLibraryName': '~assets/css/theme'
}]]]
},
loaders: [{
test: /\.(png|jpe?g|gif)$/,
loader: 'url-loader',
query: {
limit: 10000, // 10KO
name: 'img/[name].[hash].[ext]'
}
},
{
test: /\.(eot|svg|woff|woff2|[ot]tf)$/,
loader: 'url-loader',
query: {
limit: 10000, // 10KO
name: 'fonts/[name].[hash].[ext]'
}
}
],
postcss: [
require('postcss-nested')(),
require('postcss-hexrgba')(),
require('postcss-cssnext')()
]
},
/**
* add lru-cache support
*/
cache: true
}