forked from kodadot/nft-gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
98 lines (91 loc) · 2.11 KB
/
vue.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
// vue.config.js
module.exports = {
// https://cli.vuejs.org/config/#publicpath
publicPath: '/',
runtimeCompiler: true,
productionSourceMap: false,
// https://webpack.js.org/configuration/dev-server/
// https://cli.vuejs.org/config/#devserver
devServer: {
// host: '127.0.0.1',
port: 9090,
hot: true,
disableHostCheck: true,
proxy: {
'/.netlify': {
target: 'http://localhost:9000',
pathRewrite: { '^/.netlify/functions': '' }
}
}
},
pwa: {
workboxPluginMode: 'GenerateSW',
workboxOptions: {
skipWaiting: true
}
},
chainWebpack: config => {
if (process.env.NODE_ENV === 'test') {
const scssRule = config.module.rule('scss')
scssRule.uses.clear()
scssRule
.use('null-loader')
.loader('null-loader')
}
// ...other chains
config.module // fixes https://github.com/graphql/graphql-js/issues/1272
.rule('graphql')
.test(/\.(graphql|gql)$/)
.use('graphql-tag/loader')
.loader('graphql-tag/loader')
.end()
.rule('mjs$')
.test(/\.mjs$/)
.type('javascript/auto')
.include.add(/node_modules/)
.end()
},
configureWebpack: {
resolve: {
// .mjs needed for https://github.com/graphql/graphql-js/issues/1272
extensions: ['*', '.mjs', '.js', '.vue', '.json']
},
module: {
rules: [ // fixes https://github.com/graphql/graphql-js/issues/1272
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
}
]
}
},
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'en',
localeDir: 'locales',
enableInSFC: true
},
sitemap: {
baseURL: 'https://nft.kodadot.xyz',
outputDir: './public',
defaults: {
changefreq: 'daily',
priority: 1.0,
},
pretty: true,
urls: [
'/',
'/rmrk/rare',
'/rmrk/gallery',
'/rmrk/mint',
'/rmrk/create',
'/rmrk/credit',
'/rmrk/faq',
'/carbonless',
'/sustainability'
]
}
}
}