/
lavas.config.js
54 lines (47 loc) · 1.35 KB
/
lavas.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
/**
* @file lavas config
* @author *__ author __*{% if: *__ email __* %}(*__ email __*){% /if %}
*/
'use strict';
const path = require('path');
const BUILD_PATH = path.resolve(__dirname, 'dist');
const isDev = process.env.NODE_ENV === 'development';
const isProd = process.env.NODE_ENV === 'production';
module.exports = {
build: {
ssr: false,
path: BUILD_PATH,
publicPath: '/',
ssrCopy: isDev ? [] : [
{
src: 'server.prod.js'
},
{
src: 'package.json'
}
]
},
router: {
mode: 'history',
base: '/',
pageTransition: {
type: 'fade',
transitionClass: 'fade'
}
},
serviceWorker: {
// If true, generate service-worker.js and sw-register.js
// Default to `false`
enable: true,
// Path of service worker template
swSrc: path.join(__dirname, 'core/service-worker.js'),
// Path of generated service worker file
swDest: path.join(BUILD_PATH, 'service-worker.js'),
// If true, `workbox.routing.registerNavigationRoute()` won't be generated
// Defaults to `false`
disableGenerateNavigationRoute: true,
// URL of appshell page
// ONLY works in SSR mode
appshellUrl: '/appshell'
}
};