forked from chewtoys/WebshopNuxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
123 lines (122 loc) · 2.95 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
import axios from 'axios';
import moment from 'moment';
module.exports = {
/*
** Headers of the page
*/
head: {
title: 'frontend',
htmlAttrs: {
lang: 'nl',
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: 'Webshop WRAutomaten',
},
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
// { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Material+Icons' },
],
},
/*
** Customize the progress bar color
*/
loading: { color: '#7C0000' },
/*
** Build configuration
*/
build: {
// Add exception
transpile: ['vee-validate/dist/rules'],
},
server: {
port: 8081,
host: '0.0.0.0',
},
vue: {
config: {
performance: true,
},
},
vendor: ['axios', 'vue-cookie', 'vue-notifications'],
modules: [
'@nuxtjs/axios',
'@nuxtjs/style-resources',
'@nuxtjs/proxy',
'@nuxtjs/sitemap',
[
'@nuxtjs/google-tag-manager',
{
id: 'GTM-TFQ2RHZ',
layer: 'dataLayer',
pageTracking: true,
},
],
],
plugins: [
'~plugins/vue-cookie.ts',
'~plugins/axios.ts',
'~plugins/lazyload.ts',
'~plugins/vuelidate.ts',
'~plugins/composition-api.ts',
'~plugins/validator.ts',
{ src: '~/plugins/axe', ssr: false },
],
css: ['@/assets/scss/style.scss'],
styleResources: {
scss: ['@/assets/scss/_vars.scss'],
},
layoutTransition: {
name: 'layout',
mode: 'out-in',
},
axios: {
// baseURL: 'https://backend.wrautomaten.nl/api',
// baseURL: 'https://localhost:44337/api',
baseURL: 'https://wrbackend.azurewebsites.net/api',
},
// proxy: {
// '/api': {
// target: 'https://wrbackend.azurewebsites.net/api',
// pathRewrite: {
// '^/api': '/',
// },
// },
// },
buildModules: ['@nuxt/typescript-build'],
// sitemap: {
// hostname: 'https://www.wrautomaten.nl',
// gzip: true,
// exclude: ['account'],
// routes() {
// if (process.env.NODE_ENV !== 'production') {
// axios.defaults.baseURL = 'http://localhost:8081/api/products';
// } else {
// axios.defaults.baseURL = 'https://www.wrautomaten.nl/api/products';
// }
// return axios
// .get('/')
// .then((res) => {
// const routes = [];
// res.data.forEach((product) => {
// const route = {};
// route.url = `/products/${product.id}`;
// route.changefreq = 'daily';
// route.priority = 1;
// route.lastmod = moment(product.created).toISOString();
// routes.push(route);
// });
// return routes;
// })
// .catch((e) => {
// // eslint-disable-next-line no-console
// console.log(e);
// });
// },
// },
};