Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: prod builds loads asset files with relative file urls, not from the backend over http #22

Closedjuliusmarmingewants to merge 2 commits intomain fromcodething/25389242opened View on GitHub

Showing 30 changed files with 106 additions and 27 deletions (loading 27).

x
0 of 30 viewed, 30 left
1 addition and 0 deletionsapps/desktop/scripts/smoke-test.mjsModified
View file
@@ -40,6 +40,7 @@
"Uncaught Error",
"Uncaught TypeError",
"Uncaught ReferenceError",
+ "ERR_FILE_NOT_FOUND",
];
const failures = fatalPatterns.filter((pattern) => output.includes(pattern));
​
95 additions and 24 deletionsapps/desktop/src/main.tsModified
View file
@@ -17,8 +17,11 @@
const CONTEXT_MENU_CHANNEL = "desktop:context-menu";
const OPEN_EXTERNAL_CHANNEL = "desktop:open-external";
const ROOT_DIR = path.resolve(__dirname, "../../..");
+const LOOPBACK_HOST = "127.0.0.1";
+const DEFAULT_BACKEND_PORT = 3773;
+const BACKEND_READY_TIMEOUT_MS = 10_000;
+const BACKEND_READY_RETRY_DELAY_MS = 100;
const BACKEND_ENTRY = path.join(ROOT_DIR, "apps/server/dist/index.mjs");
-const WEB_ENTRY = path.join(ROOT_DIR, "apps/web/dist/index.html");
const STATE_DIR = path.join(os.homedir(), ".t3", "userdata");
const isDevelopment = Boolean(process.env.VITE_DEV_SERVER_URL);
​
@@ -31,22 +34,16 @@
let restartTimer: ReturnType<typeof setTimeout> | null = null;
let isQuitting = false;
​