· 4 years ago · Jul 21, 2021, 03:26 PM
1import path from 'path'
2import fs from 'fs'
3
4export default {
5 // Target: https://go.nuxtjs.dev/config-target
6 target: 'static',
7
8 // Global page headers: https://go.nuxtjs.dev/config-head
9 head: {
10 title: 'prague-days-web',
11 htmlAttrs: {
12 lang: 'cs'
13 },
14 meta: [
15 { charset: 'utf-8' },
16 { name: 'viewport', content: 'width=device-width, initial-scale=1' },
17 { hid: 'description', name: 'description', content: '' }
18 ],
19 link: [
20 { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
21 ]
22 },
23
24 // Global CSS: https://go.nuxtjs.dev/config-css
25 css: [
26 'normalize.css/normalize.css',
27 '~/assets/iconfont/dist/nuxt-fontagon-icon.sass'
28 ],
29
30 // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
31 plugins: [
32 '~/plugins/format-price.js',
33 '~/plugins/cookies.js',
34 { src: '~/plugins/vuelidate' }
35 ],
36
37 // Auto import components: https://go.nuxtjs.dev/config-components
38 components: true,
39
40 // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
41 buildModules: [
42 // https://go.nuxtjs.dev/eslint
43 '@nuxtjs/eslint-module',
44 'nuxt-lazysizes',
45 'nuxt-fontagon'
46 ],
47
48 // Modules: https://go.nuxtjs.dev/config-modules
49 modules: [
50 // https://go.nuxtjs.dev/axios
51 '@nuxtjs/style-resources',
52 '@nuxtjs/axios',
53 'nuxt-element-ui',
54 // 'nuxt-leaflet',
55 'cookieparser'
56 ],
57
58 iconFont: {
59 fontName: 'nuxt-fontagon-icon',
60 files: ['assets/iconfont/src/*.svg'],
61 dist: 'assets/iconfont/dist/',
62 classOptions: {
63 baseClass: 'svg-font',
64 classPrefix: 'svg-font-'
65 },
66 styleTemplate: {
67 css: 'assets/iconfont/css-template.hbs'
68 }
69 },
70
71 // Axios module configuration: https://go.nuxtjs.dev/config-axios
72 axios: {
73 baseURL: 'https://stage.praguedays.com/api',
74 proxyHeaders: false,
75 credentials: false
76 },
77
78 proxy: {
79 // '/api': { target: 'https://stage.praguedays.com/api', pathRewrite: {'^/api': ''} }
80 },
81
82 //
83 // server: {
84 // https: {
85 // key: fs.readFileSync(path.resolve(__dirname, 'server.key')),
86 // cert: fs.readFileSync(path.resolve(__dirname, 'server.crt'))
87 // }
88 // },
89
90 elementUI: {
91 components: [
92 'Drawer',
93 'Form',
94 'FormItem',
95 'Icon',
96 'Table',
97 'TableColumn',
98 'Alert',
99 'Input',
100 'Button',
101 'Container',
102 'Row',
103 'Col',
104 'Dialog',
105 'Timeline',
106 'TimelineItem',
107 'Card'
108 ],
109 locale: 'en'
110 },
111
112 lazySizes: {
113 plugins: {
114 nativeLoading: true,
115 unveilhooks: true
116 }
117 },
118
119 styleResources: {
120 scss: [
121 '~/assets/scss/main.scss'
122 ]
123 },
124
125 // Build Configuration: https://go.nuxtjs.dev/config-build
126 build: {
127
128 }
129}
130