-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
79 lines (79 loc) · 1.87 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
import messages from './locales/index.js'
export default {
head() {
return {
title: `${this.$t('head')}`,
htmlAttrs: {
lang: 'en'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'keywords', content: this.$t('keywords') },
{ hid: 'description', name: 'description', content: this.$t('description') },
{ name: 'format-detection', content: 'telephone=no' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
}
},
css: [
'element-ui/lib/theme-chalk/index.css',
'@/assets/css/common.css'
],
plugins: [
'@/plugins/element-ui',
'@/plugins/i18n.js',
'@/plugins/axios',
'@/plugins/filters',
{ src: '@/plugins/echarts', ssr: false },
{ src: '~plugins/ga.js', ssr: false }
],
extendPlugins(plugins) {
const pluginIndex = plugins.findIndex(src => src === '@/plugins/i18n.js')
const shouldBeFirstPlugin = plugins[pluginIndex]
plugins.splice(pluginIndex, 1)
plugins.unshift(shouldBeFirstPlugin)
return plugins
},
components: true,
buildModules: [
'@nuxtjs/tailwindcss',
'@nuxtjs/eslint-module',
...process.env.NODE_ENV === 'production' ? [
['@nuxtjs/google-analytics', { id: process.env.GOOGLE_ANALYTICS }],
'@nuxtjs/pwa'
] : []
],
modules: [
'@nuxtjs/axios',
'nuxt-i18n'
],
axios: {
baseURL: 'https://ethsta.com/api/'
},
i18n: {
locales: [
{
code: 'en',
iso: 'en-US',
name: 'English',
},
],
defaultLocale: 'en',
strategy: 'no_prefix',
vueI18n: {
fallbackLocale: 'en',
messages
},
detectBrowserLanguage: {
useCookie: true,
// alwaysRedirect: true,
},
seo: true,
},
build: {
transpile: [/^element-ui/],
}
}