VueTorrent/vue.config.js
m4ximuel dfbed5cb05
feat: PWA splash & bar color
* Update vue.config.js

edit colorcode " themeColor: '#597566' " to what do you want
"background_color" make show custom color on android PWA splash page.

* Update vue.config.js

* enable color + disable host check for dev server

Co-authored-by: Daan Wijns <dw.daanwijns@gmail.com>
2021-04-03 09:45:02 +02:00

52 lines
1.2 KiB
JavaScript

const webpack = require('webpack')
const qBittorrentPort = process.env['QBITTORRENT_PORT'] ?? 8080
const vueTorrentPort = process.env['VUETORRENT_PORT'] ?? 8000
module.exports = {
pwa: {
name: 'VueTorrent', //PWApp name
themeColor: '#597566', //PWA title bar color ( windows 10 PWA, android web browser and PWA address bar color )
manifestOptions: {
background_color: '#eeeeee' //background color for android PWA splash page
},
workboxOptions: {
skipWaiting: true
}
},
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = 'VueTorrent'
return args
})
},
outputDir: 'vuetorrent/public',
publicPath: './',
transpileDependencies: ['vuetify'],
configureWebpack: {
devtool: 'source-map',
plugins: [
new webpack.DefinePlugin({
APPLICATION_VERSION: JSON.stringify(
require('./package.json').version
)
})
]
},
devServer: {
watchOptions: {
poll: true
},
host: '0.0.0.0',
port: `${vueTorrentPort}`,
disableHostCheck: true, //allows https proxy for dev server
proxy: {
'/api': {
target: `http://localhost:${qBittorrentPort}`
}
}
}
}