MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / devCrashGuard

Function devCrashGuard

apps/cloud/vite.config.ts:18–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16// `'error'` emit is unhandled and tears down the whole dev server. Log
17// enough to identify the offender and keep the server alive.
18const devCrashGuard = (): Plugin => {
19 let installed = false;
20 const install = () => {
21 if (installed) return;
22 installed = true;
23 process.on("uncaughtException", (err, origin) => {
24 console.error(`[dev-crash-guard] uncaughtException (origin=${origin}):`, err);
25 });
26 process.on("unhandledRejection", (reason, promise) => {
27 console.error("[dev-crash-guard] unhandledRejection:", reason, promise);
28 });
29 };
30 return {
31 name: "dev-crash-guard",
32 apply: "serve",
33 configureServer: install,
34 };
35};
36
37const loadWranglerPublicVars = () => {
38 const wranglerConfig = unstable_readConfig(

Callers 1

vite.config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected