I'm building a desktop application using Tauri and React. While everything works fine in development mode, the production build gets stuck on the splash screen and the main window never renders. The backend tasks complete successfully, but the frontend doesn't seem to initialize properly.
Environment
Tauri: 2.0.0
React
macOS
Build command: yarn build
Current Setup
Tauri Configuration
{
"build": {
"beforeDevCommand": "yarn dev",
"devUrl": "http://localhost:3000",
"beforeBuildCommand": "yarn build",
"frontendDist": "../build"
},
"app": {
"windows": [
{
"label": "main",
"title": "MapMap",
"maximized": true,
"resizable": true,
"visible": false,
"width": 1200,
"height": 800,
"center": true
},
{
"label": "splashscreen",
"title": "MapMap - Loading",
"url": "splash.html",
"maximized": true,
"resizable": true,
"alwaysOnTop": false,
"visible": true,
"width": 800,
"height": 600,
"center": true
}
],
"security": {
"csp": "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: ipc: http: https: ws:; connect-src 'self' ipc: http: https: data: ws:; img-src 'self' data: https: blob:; style-src 'self' 'unsafe-inline' https:; font-src 'self' data: https:; media-src 'self' https: data: blob:;",
"devCsp": "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: ipc: http: https: ws:; connect-src 'self' ipc: http: https: data: ws:; img-src 'self' data: https: blob:; style-src 'self' 'unsafe-inline' https:; font-src 'self' data: https:; media-src 'self' https: data: blob:;"
}
}
}