-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.config.js
48 lines (45 loc) · 1.59 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
// vue.config.js
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path')
// Root path
const root = '' // Compilation root path
const pwaRoot = '/sangbok/' // PWA entrypoint. Not used when pwa is disabled
// Version info
let commitId
try {
commitId = require('child_process').execSync('git rev-list --max-count=1 --abbrev=8 --abbrev-commit HEAD').toString().trimEnd('\n')
} catch {
console.warn('[WARNING] git doesn\'t seem to be installed. Cannot add commit info to the build. This may cause problems with PWA caching.')
}
/**
* @type {import('@vue/cli-service').ProjectOptions}
*/
module.exports = {
publicPath: root, // See https://cli.vuejs.org/config/#publicpath for limitations.
lintOnSave: true,
devServer: {
headers: { 'Service-Worker-Allowed': 'http://localhost:8080' },
static: { directory: path.join(__dirname, 'public'), publicPath: root }
},
pwa: { // https://cli.vuejs.org/core-plugins/pwa.html#configuration
name: 'Konglig Fysiks Sångbok',
themeColor: '#FF642B',
msTileColor: '#222',
manifestOptions: {
short_name: 'Sångboken',
background_color: '#222222',
// Description
author: 'F.com',
description: 'Den officiella, sökbara sångboken för Fysiksektionen vid THS innehåller både nya och gamla sånger för gasque och bankett.',
// Display info
lang: 'sv',
dir: 'ltr',
orientation: 'portrait',
display: 'standalone',
start_url: pwaRoot,
scope: pwaRoot
},
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black-translucent'
}
}