关闭桌面壳主窗口调试器
桌面壳主 WebView 显式关闭 DevTools 桌面壳配置检查拒绝 DevTools 配置和 feature 漂移 宿主壳方案和共享决策记录桌面调试边界
This commit is contained in:
@@ -364,6 +364,10 @@ if (!String(config.build?.devUrl ?? '').startsWith('http://127.0.0.1:3000/?')) {
|
||||
throw new Error('desktop shell dev URL must load the local Vite H5 entry');
|
||||
}
|
||||
|
||||
if (mainWindow.devtools !== false) {
|
||||
throw new Error('desktop shell main WebView devtools must be explicitly disabled');
|
||||
}
|
||||
|
||||
assertDesktopIconSet();
|
||||
|
||||
if (config.bundle?.active !== true || config.bundle?.targets !== 'all') {
|
||||
@@ -561,6 +565,10 @@ if (!cargoManifest.includes('features = ["tray-icon"]')) {
|
||||
throw new Error('desktop shell must enable the Tauri tray-icon feature');
|
||||
}
|
||||
|
||||
if (cargoManifest.includes('"devtools"')) {
|
||||
throw new Error('desktop shell must not enable Tauri devtools feature');
|
||||
}
|
||||
|
||||
if (!cargoManifest.includes('tauri-plugin-single-instance = "2.4.2"')) {
|
||||
throw new Error('desktop shell must depend on tauri-plugin-single-instance');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user