mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-18 16:11:38 +03:00
6dcccf5a8e
* fix(js-cli) resolve correct paths on `tauri init` * feat(js-cli) inject src-tauri/ as lodash template * fix(js-cli) entry paths * feat(js-cli) rename APP_URL to devPath and allow .html values * feat(js-cli) reload config when `tauri.conf.js` change detected * feat(node): update to testing * feat(template): fix phf, remove updater * feat(samples): add vanillajs * fix(templates): objectify tauri Closes #99. * fix(examples): update cargo.toml - to match signature * chore(tauri): version update * feat(workflows): fix dirs, add tokens * fix(config): more robust env checking * feat(fixture): start a testing fixture for tauri * fix(workflow): use fixture for ENV * fix(examples:vanilla): remove updater * addition to previous commit re. fixture * fix(config.rs): fix the unfix * feat(js-cli) use the new cargo-tauri-cli * chore(template) cleanup src-tauri/Cargo.toml * chore(js-cli) toml features cleanup * chore(js-cli) move edge to config > tauri * fix(js-cli) appPaths resolve() instead of join()
43 lines
959 B
JavaScript
43 lines
959 B
JavaScript
const appPaths = require('./app-paths')
|
|
const merge = require('webpack-merge')
|
|
|
|
module.exports = cfg => {
|
|
const tauriConf = require(appPaths.resolve.app('tauri.conf.js'))(cfg.ctx)
|
|
const config = merge({
|
|
build: {
|
|
distDir: './dist'
|
|
},
|
|
ctx: {},
|
|
tauri: {
|
|
embeddedServer: {
|
|
active: true
|
|
},
|
|
bundle: {
|
|
active: true
|
|
},
|
|
whitelist: {
|
|
all: false
|
|
},
|
|
window: {
|
|
title: require(appPaths.resolve.app('package.json')).productName
|
|
},
|
|
security: {
|
|
csp: 'default-src data: filesystem: ws: http: https: \'unsafe-eval\' \'unsafe-inline\''
|
|
},
|
|
automaticStart: {
|
|
active: false,
|
|
devArgs: [],
|
|
buildArgs: []
|
|
},
|
|
edge: {
|
|
active: true
|
|
}
|
|
}
|
|
}, tauriConf, cfg)
|
|
|
|
process.env.TAURI_DIST_DIR = appPaths.resolve.app(config.build.distDir)
|
|
process.env.TAURI_CONFIG_DIR = appPaths.tauriDir
|
|
|
|
return config
|
|
}
|