2019-11-16 21:51:46 +03:00
|
|
|
const appPaths = require('./app-paths')
|
|
|
|
const merge = require('webpack-merge')
|
2019-08-20 00:09:29 +03:00
|
|
|
|
|
|
|
module.exports = cfg => {
|
|
|
|
const tauriConf = require(appPaths.resolve.app('tauri.conf.js'))(cfg.ctx)
|
|
|
|
const config = merge({
|
2019-10-07 21:36:56 +03:00
|
|
|
build: {
|
|
|
|
distDir: './dist'
|
|
|
|
},
|
2019-08-20 00:09:29 +03:00
|
|
|
ctx: {},
|
|
|
|
tauri: {
|
|
|
|
embeddedServer: {
|
|
|
|
active: true
|
|
|
|
},
|
|
|
|
bundle: {
|
|
|
|
active: true
|
|
|
|
},
|
2019-10-07 21:36:56 +03:00
|
|
|
whitelist: {
|
|
|
|
all: false
|
|
|
|
},
|
2019-08-20 00:09:29 +03:00
|
|
|
window: {
|
|
|
|
title: require(appPaths.resolve.app('package.json')).productName
|
|
|
|
},
|
|
|
|
security: {
|
|
|
|
csp: 'default-src data: filesystem: ws: http: https: \'unsafe-eval\' \'unsafe-inline\''
|
2019-11-24 18:11:06 +03:00
|
|
|
},
|
|
|
|
automaticStart: {
|
|
|
|
active: false,
|
|
|
|
devArgs: [],
|
|
|
|
buildArgs: []
|
2019-11-30 14:48:39 +03:00
|
|
|
},
|
|
|
|
edge: {
|
|
|
|
active: true
|
2019-08-20 00:09:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}, tauriConf, cfg)
|
|
|
|
|
|
|
|
process.env.TAURI_DIST_DIR = appPaths.resolve.app(config.build.distDir)
|
2019-11-30 14:48:39 +03:00
|
|
|
process.env.TAURI_CONFIG_DIR = appPaths.tauriDir
|
|
|
|
|
2019-08-20 00:09:29 +03:00
|
|
|
return config
|
|
|
|
}
|