-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.vuetify.js
124 lines (114 loc) · 2.6 KB
/
nuxt.config.vuetify.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
const pkg = require('./package');
//const {execute, makePromise} = require('apollo-link');
//const {createHttpLink} = require('apollo-link-http');
//const fetch = require('node-fetch');
//const gql = require('graphql-tag');
require('dotenv').config();
const host = process.env.HOST || 'localhost';
const graph = 'http://' + host + ':4000/graphql';
module.exports = {
env: {
graphServer: graph,
graphClient: (process.env.BASE_URL && !process.env.BASE_URL.includes(host) ? process.env.BASE_URL + '/graphql' : graph),
dev: process.env.NODE_ENV !== 'production',
googleMapsAPI: process.env.GOOGLE_API_KEY,
},
mode: 'universal',
srcDir: 'src/client/',
modern: true,
server: {
host: host,
port: process.env.PORT || (process.env.dev ? 8000 : 3000),
},
router: {
prefetchLinks: !process.env.dev,
},
/*serverMiddleware: [
{path: '/graphql', handler: '../server/apollo/middleware.js'},
],*/
/*css: [
'~/assets/style/app.styl'
],*/
loading: {color: '#f00'},
head: {
//title: pkg.name,
titleTemplate: '%s | ' + pkg.name,
meta: [
{charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
{hid: 'description', name: 'description', content: pkg.description}
],
link: [
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'},
]
},
generate: {
//dir: 'docs',
//routes: require('./routes'),
routes: function() {
return require('./routes');
}
},
plugins: [
'@/plugins/filters',
'@/plugins/mixins',
'@/plugins/googlemaps',
],
modules: [
'@nuxtjs/apollo',
'@nuxtjs/pwa',
'@nuxtjs/sitemap',
'@nuxtjs/webpackmonitor',
'@nuxtjs/robots',
'@nuxtjs/vuetify',
//['@nuxtjs/localtunnel', {subdomain: 'ingoa'}],
//['@nuxtjs/feed', {}],
/*['@nuxtjs/google-analytics', {
id: 'UA-45273295-4'
}],*/
'nuxt-leaflet',
'nuxt-trailingslash-module',
[
'nuxt-i18n',
{
strategy: 'prefix_except_default',
defaultLocale: 'en',
lazy: true,
langDir: 'locales/',
locales: require('./src/client/locales/locales.json'),
parsePages: false,
pages: require('./src/client/locales/pages.js'),
vuex: false,
},
],
],
apollo: {
includeNodeModules: true,
clientConfigs: {
default: '@/plugins/apollo.js'
},
},
build: {
transpile: [/^vue2-google-maps($|\/)/],
loaders: {
stylus: {
import: ['~assets/style/variables.styl']
}
},
extractCSS: true,
optimizeCSS: true,
/*babel: {
presets({isServer}) {
return [
[
require.resolve('@nuxt/babel-preset-app'),
{
targets: isServer ? {node: '10'} : {ie: '11'},
corejs: {version: 3}
}
]
]
}
}*/
}
};