Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-dev-toolbar-css.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/start": patch
---

Avoid loading the development toolbar stylesheet in production.
7 changes: 6 additions & 1 deletion packages/start/src/shared/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// @refresh skip
import { catchError, ErrorBoundary as DefaultErrorBoundary, type ParentProps } from "solid-js";
import { isServer } from "solid-js/web";
import { DevToolbar } from "./dev-toolbar/index.tsx";
import clientOnly from "./clientOnly.ts";
import { HttpStatusCode } from "./HttpStatusCode.ts";

const DevToolbar = clientOnly(
() => import("./dev-toolbar/index.tsx").then(({ DevToolbar }) => ({ default: DevToolbar })),
{ lazy: true },
);

export const ErrorBoundary =
import.meta.env.DEV && import.meta.env.START_DEV_OVERLAY
? (props: ParentProps) => <DevToolbar>{props.children}</DevToolbar>
Expand Down
Loading