forked from bitcat365/oasisscan-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
127 lines (122 loc) · 3.46 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
118
119
120
121
122
123
124
125
126
127
const pkg = require('./package')
module.exports = {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: 'OASIS SCAN | Oasis Blockchain Explorer',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'OASIS SCAN provides an easy to use and popular block explorer, powerful data and advanced analytics. allows you to explore and search the OASIS blockchain for Entity, Block, Block hash, Txn hash, validator info. ' },
],
script: [
{ src: 'https://www.googletagmanager.com/gtag/js?id=UA-6150405-8', body: true, async: true },
{
innerHTML: `console.log(1111);window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-6150405-8');`,
type: 'text/javascript',
charset: 'utf-8',
body: true
}
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
__dangerouslyDisableSanitizers: ['script']
},
router: {
middleware: ['config', 'i18n']
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
'iview/dist/styles/iview.css'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
'~/plugins/axios.js',
'@/plugins/iview',
'~/plugins/i18n.js',
'~/plugins/my-mixin.js',
{ src: '~plugins/highchart.js' },
'~/plugins/clipboard.js',
'~/plugins/toast.js',
'~/plugins/filters.js'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/pwa'
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
// baseURL: 'http://172.18.11.63:3000',
proxyHeaders: false,
// retry: { retries: 3 }
credentials: false,
proxy: true
},
// proxy: [
// 'https://api.oasisscan.com/testnet/',
// 'https://api.oasisscan.com/mainnet/'
// ],
proxy: {
'/testnet/': { target: 'http://95.216.211.124:9181', pathRewrite: { '^/testnet/': '' } },
'/mainnet/': { target: 'http://95.216.211.124:8181', pathRewrite: { '^/mainnet/': '' } }
},
/*
** Build configuration
*/
build: {
postcss: {
plugins: {
'postcss-px-to-viewport': {
unitToConvert: 'md',
viewportWidth: 750, // (Number) The width of the viewport.
viewportHeight: 1334, // (Number) The height of the viewport.
unitPrecision: 6, // (Number) The decimal numbers to allow the vw units to grow t
viewportUnit: 'vw', // (String) Expected units.
selectorBlackList: ['.ignore', '.hairlines'], // (Array) The selectors to ignore and leave as px.
minPixelValue: 1, // (Number) Set the minimum pixel value to replace.
mediaQuery: true // (Boolean) Allow px to be converted in media queries.
}
// 'cssnano': {
// preset: 'advanced',
// autoprefixer: false,
// 'postcss-zindex': false
// }
}
},
/*
** You can extend webpack config here
*/
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
// loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
}
}