-
Notifications
You must be signed in to change notification settings - Fork 0
/
gridsome.config.js
100 lines (93 loc) · 2.87 KB
/
gridsome.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
// This is where project configuration and plugin options are located.
// Learn more: https://gridsome.org/docs/config
// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')
module.exports = {
siteName: 'Zuly Pizza',
siteUrl: 'https://zuly.pizza',
siteDescription: 'Hacemos pizzas, las mejores de la huasteca hidalguense. Envíos a domicilio. Te esperamos en Atlapexco, Hidalgo. Descrubre nuestras promociones. Pizzas elaboradas con ingredientes de calidad.',
metadata: {
themeColor: '#44A573',
locales: ['es-mx', 'es'],
ogType: 'website',
ogImage: 'src/assets/img/icon_325x325.png'
},
plugins: [
{
use: '@gridsome/source-filesystem',
options: {
path: 'content/organization.json',
typeName: 'Organization'
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'content/products/**/*.json',
typeName: 'Product'
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'content/services/**/*.json',
typeName: 'Service'
}
},
{
use: '@gridsome/source-filesystem',
options: {
path: 'content/promotions/**/*.json',
typeName: 'Promotion'
}
}
],
chainWebpack (chain) {
// console.log(chain.toString())
// Sass options were moved inside sassOptions in sass-loader v8.0.0
// Gridsome v0.7.0 does not support the new schema
// To overcome this issue, we delete the indentedSyntax prop, so that
// sass-loader does not display an error of unknown properties
// https://github.com/gridsome/gridsome/issues/750
chain.module
.rule('sass')
.oneOf('modules')
.use('sass-loader')
.tap(options => {
delete options.indentedSyntax
return options
})
// Override default configuration to save images in the same directory
// that Gridsome uses
chain.module
.rule('images')
.use('url-loader')
.tap(options => ({
limit: 5000,
name (file) {
if (process.env.NODE_ENV === 'development') {
return '[path][name].[ext]'
}
return 'assets/static/[name].[hash].[ext]'
}
}))
chain.plugin('vuetify-loader')
.use(VuetifyLoaderPlugin)
},
transpileDependencies: ['vuetify'], // Transpile Vuetify to support old browsers
css: {
loaderOptions: {
sass: {
additionalData: "@import 'src/scss/vuetify_vars.scss'", // Override vuetify sass variables
// Sass options were moved inside sassOptions in sass-loader v8.0.0
// Gridsome v0.7.0 does not support the new schema
// To overcome this issue, we set options in here
sassOptions: {
indentedSyntax: true
}
}
}
},
port: 8082
}