-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
45 lines (43 loc) · 1.26 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
process.env.VUE_APP_VERSION = require('./package.json').version
const SentryWebpackPlugin = require('@sentry/webpack-plugin')
const PrerenderSPAPlugin = require('prerender-spa-plugin')
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer
const path = require('path')
module.exports = {
productionSourceMap: true,
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = 'MaveRegistry'
return args
})
},
configureWebpack: () => {
if (process.env.NODE_ENV !== 'production') return
return {
plugins: [
new SentryWebpackPlugin({
include: './dist/',
ignoreFile: '.sentrycliignore',
ignore: ['node_modules', 'webpack.config.js'],
configFile: 'sentry.properties',
validate: true,
release: 'mave-registry-frontend@' + process.env.VUE_APP_VERSION
}),
new PrerenderSPAPlugin({
staticDir: path.join(__dirname, 'dist'),
routes: [ '/', '/policy/terms', '/policy/privacy', '/about'],
renderer: new Renderer({
headless: true,
renderAfterDocumentEvent: 'render-event'
})
})
],
devtool: 'source-map'
}
},
devServer: {
disableHostCheck: true
}
}