mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 03:02:28 +03:00
Feature/edge (#61)
* feat(lib) propagate edge feature to web-view crate * feat(cli) add edge feature to config
This commit is contained in:
parent
fdbc556b8f
commit
19322a24e6
@ -38,7 +38,7 @@ clap = {version = "2.33", features = ["yaml"]}
|
||||
includedir_codegen = "0.5.0"
|
||||
|
||||
[features]
|
||||
# edge = ["webview-sys/edge"]
|
||||
edge = ["web-view/edge"]
|
||||
dev = []
|
||||
embedded-server = []
|
||||
all-api = []
|
||||
|
@ -12,7 +12,7 @@ const { appDir, tauriDir } = require('./helpers/app-paths')
|
||||
|
||||
const logger = require('./helpers/logger')
|
||||
const log = logger('app:tauri', 'green')
|
||||
const warn = log('app:tauri (template)', 'red')
|
||||
const warn = logger('app:tauri (template)', 'red')
|
||||
|
||||
class Runner {
|
||||
constructor () {
|
||||
@ -45,10 +45,14 @@ class Runner {
|
||||
this.url = url
|
||||
|
||||
const args = ['--url', url]
|
||||
const features = ['dev']
|
||||
if (cfg.tauri.edge) {
|
||||
features.push('edge')
|
||||
}
|
||||
|
||||
const startDevTauri = () => {
|
||||
return this.__runCargoCommand({
|
||||
cargoArgs: ['run', '--features', 'dev'],
|
||||
cargoArgs: ['run', '--features', ...features],
|
||||
extraArgs: args
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
const
|
||||
path = require('path'),
|
||||
distDir = path.resolve(__dirname, './dist')
|
||||
path = require('path');
|
||||
const distDir = path.resolve(__dirname, './dist')
|
||||
|
||||
module.exports = function () {
|
||||
return {
|
||||
@ -25,6 +25,7 @@ module.exports = function () {
|
||||
security: {
|
||||
csp: 'default-src data: filesystem: ws: http: https: \'unsafe-eval\' \'unsafe-inline\''
|
||||
}
|
||||
}
|
||||
},
|
||||
edge: true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user