2019-08-20 00:09:29 +03:00
|
|
|
const appPaths = require('./app-paths'),
|
|
|
|
merge = require('webpack-merge')
|
|
|
|
|
|
|
|
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\''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, tauriConf, cfg)
|
|
|
|
|
|
|
|
process.env.TAURI_DIST_DIR = appPaths.resolve.app(config.build.distDir)
|
|
|
|
return config
|
|
|
|
}
|