feat(csr): add stripped dev output diagnostics
This commit is contained in:
@@ -18,8 +18,16 @@ export { REALTIME_RUNTIME } from "./realtime-runtime.ts";
|
||||
export { ACTION_RUNTIME } from "./action-runtime.ts";
|
||||
|
||||
/** The reactive runtime served at `/__wrnexus/reactive.js` (plain browser JS). */
|
||||
export function getReactiveRuntime(): string {
|
||||
return REACTIVE_RUNTIME;
|
||||
export function getReactiveRuntime(development = false): string {
|
||||
if (development) {
|
||||
return REACTIVE_RUNTIME
|
||||
.replace(/\/\*__WRNEXUS_DEV_START__\*\//g, "")
|
||||
.replace(/\/\*__WRNEXUS_DEV_END__\*\//g, "");
|
||||
}
|
||||
return REACTIVE_RUNTIME.replace(
|
||||
/\/\*__WRNEXUS_DEV_START__\*\/[\s\S]*?\/\*__WRNEXUS_DEV_END__\*\//g,
|
||||
"",
|
||||
);
|
||||
}
|
||||
|
||||
/** The client-side navigation runtime served at `/__wrnexus/nav.js`. */
|
||||
|
||||
Reference in New Issue
Block a user