Tauri 桌面壳支持 navigation.openNativePage 的同源 H5 路由跳转 补充桌面壳导航白名单校验和运行时能力检查 更新宿主壳方案和项目共享决策记录
35 lines
1.6 KiB
JSON
35 lines
1.6 KiB
JSON
{
|
|
"$schema": "https://schema.tauri.app/config/2",
|
|
"productName": "Genarrative",
|
|
"version": "0.1.0",
|
|
"identifier": "world.genarrative.desktop",
|
|
"build": {
|
|
"beforeDevCommand": "npm --prefix ../.. run dev:web",
|
|
"beforeBuildCommand": "npm --prefix ../.. run build:raw && npm run typecheck",
|
|
"devUrl": "http://127.0.0.1:3000/?clientRuntime=native_app&clientType=native_app&hostShell=tauri_desktop&hostPlatform=unknown&hostVersion=0.1.0&bridgeVersion=1&hostCapabilities=host.getRuntime,share.open,share.setTarget,navigation.openNativePage,app.openExternalUrl,app.setTitle,clipboard.writeText,file.exportText",
|
|
"frontendDist": "../../../dist"
|
|
},
|
|
"app": {
|
|
"windows": [
|
|
{
|
|
"create": false,
|
|
"label": "main",
|
|
"url": "index.html?clientRuntime=native_app&clientType=native_app&hostShell=tauri_desktop&hostPlatform=unknown&hostVersion=0.1.0&bridgeVersion=1&hostCapabilities=host.getRuntime,share.open,share.setTarget,navigation.openNativePage,app.openExternalUrl,app.setTitle,clipboard.writeText,file.exportText",
|
|
"title": "Genarrative",
|
|
"width": 1280,
|
|
"height": 820,
|
|
"minWidth": 960,
|
|
"minHeight": 640
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": "default-src 'self' customprotocol: asset: http://127.0.0.1:*; img-src 'self' asset: http://127.0.0.1:* https: data: blob:; media-src 'self' asset: http://127.0.0.1:* https: data: blob:; connect-src 'self' http://127.0.0.1:* https: ws://127.0.0.1:* wss:; script-src 'self'; style-src 'self' 'unsafe-inline'; frame-src 'self' http://127.0.0.1:*"
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all",
|
|
"icon": ["icons/icon.png"]
|
|
}
|
|
}
|