VueTorrent/vue.config.js

53 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-09-12 20:51:17 +03:00
const webpack = require('webpack')
2021-02-07 11:45:59 +03:00
const qBittorrentPort = process.env['QBITTORRENT_PORT'] ?? 8080
const vueTorrentPort = process.env['VUETORRENT_PORT'] ?? 8000
2019-12-09 16:20:09 +03:00
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
}
},
2020-12-30 13:11:40 +03:00
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = 'VueTorrent'
2021-01-27 15:24:23 +03:00
2020-12-30 13:11:40 +03:00
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
2020-10-18 13:12:16 +03:00
},
2020-12-30 13:11:40 +03:00
host: '0.0.0.0',
2021-02-07 11:45:59 +03:00
port: `${vueTorrentPort}`,
disableHostCheck: true, //allows https proxy for dev server
2020-12-30 13:11:40 +03:00
proxy: {
'/api': {
2021-02-07 11:45:59 +03:00
target: `http://localhost:${qBittorrentPort}`
2020-12-30 13:11:40 +03:00
}
2020-05-20 10:59:12 +03:00
}
2020-12-30 13:11:40 +03:00
}
2019-12-09 16:20:09 +03:00
}