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

Function devCrashGuard

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

Source from the content-addressed store, hash-verified

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

Callers 1

vite.config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected