运行 Tauri 应用程序时,它只显示如下白屏:
我没有对应用程序进行任何更改
这是我创建应用程序的方式:
npx 创建 tauri 应用程序
然后我选择React作为我的前端框架
然后它创建了应用程序,我只需 cd 到该文件夹并运行 npm run tauri dev
这是我的 Tauri 配置 json 文件:
{
"$schema": "..\\node_modules/@tauri-apps/cli\\schema.json",
"build": {
"beforeBuildCommand": "npm run build",
"beforeDevCommand": "npm run start",
"devPath": "http://localhost:3000",
"distDir": "../build"
},
"package": {
"productName": "test",
"version": "0.1.0"
},
"tauri": {
"allowlist": {
"all": true
},
"bundle": {
"active": true,
"category": "DeveloperTool",
"copyright": "",
"deb": {
"depends": []
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "com.tauri.dev",
"longDescription": …Run Code Online (Sandbox Code Playgroud) tauri ×1