-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.js
106 lines (85 loc) · 2.32 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
/* eslint-disable */
//
// This is the "nuxt.config.js" file for this Feathers JS + Nuxt JS boilerplate.
// You can read more about the "nuxt.config.js" file in Nuxt's API which
// can be found here: https://nuxtjs.org/api .
//
const config = require('config')
module.exports = {
// Nuxt Build - https://nuxtjs.org/api/configuration-build
build: {
extend: ( config ) => {
config.node = {
fs: "empty"
}
},
removeAttributeQuotes: true,
removeComments: true,
},
css: [
'~/assets/sass/main.sass',
],
// Nuxt Dev - https://nuxtjs.org/api/configuration-dev
dev: ( process.env.NODE_ENV !== 'production' ),
// Nuxt Env - https://nuxtjs.org/api/configuration-env
env: {
baseUrl: process.env.BASE_URL || 'http://localhost:3030',
NODE_ENV: 'dev'
},
// Nuxt Head - https://nuxtjs.org/api/configuration-head
head: {
title: 'App',
titleTemplate: '%s - Feathers + Nuxt',
link: [
{ rel: 'icon', type: 'image/png', href: '/favicon.png' },
{ rel: 'stylesheet', href: '//fonts.googleapis.com/icon?family=Material+Icons' },
{ rel: 'stylesheet', href: '//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900|Abril+Fatface' },
],
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0005' },
{ hid: 'description', name: 'description', content: 'Meta description' },
],
},
mode: 'spa',
layoutTransition: 'layout',
transition: {
name: 'layout',
mode: 'out-in',
},
loader: 'sass-loader',
// Nuxt Loading - https://nuxtjs.org/api/configuration-loading
loading: {
color: '#222222',
height: '4px'
},
// Nuxt Plugins (can be custom plugins as well) - https://nuxtjs.org/api/configuration-plugins
plugins: [
'~/plugins/default.js',
'~/plugins/vuelidate.js',
{ src: '~/plugins/notifications.js', ssr: false },
],
// Nuxt Render - https://nuxtjs.org/api/configuration-render
render: {
// Gzip compression. Can be set to a value from 0 - 9.
gzip: {
threshold: 9 // 9 is the "best" compression.
},
// Enables http2: https://developers.google.com/web/fundamentals/performance/http2/
http2: {
push: true
}
},
router: {
base: '/'
},
// Nuxt srcDir - https://nuxtjs.org/api/configuration-srcdir
srcDir: 'client/',
server: {
port: config.port,
host: config.host
},
serverMiddleware: [
'../src'
]
}