-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvue.config.js
35 lines (31 loc) · 1.01 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
var PrerenderSpaPlugin = require('prerender-spa-plugin')
const PuppeteerRenderer = PrerenderSpaPlugin.PuppeteerRenderer
var path = require('path')
module.exports = {
configureWebpack: config => {
if (process.env.NODE_ENV !== 'production') return
return {
plugins: [
new PrerenderSpaPlugin(
// Absolute path to compiled SPA
path.resolve(__dirname, './dist'),
// List of routes to prerender
[ '/', '/farm', '/liquidity', '/Bridge'],
new PuppeteerRenderer()
),
]
}
},
chainWebpack: config => {
config.plugins.delete('hmr');
if (process.env.NODE_ENV === 'production') {
config.module.rule('vue').uses.delete('cache-loader');
config.module.rule('js').uses.delete('cache-loader');
config.module.rule('ts').uses.delete('cache-loader');
config.module.rule('tsx').uses.delete('cache-loader');
}
},
devServer: {
hot: false
}
};