From 6cc0ff147588ee742e4f61acc82b4825d83c6d6c Mon Sep 17 00:00:00 2001 From: restareaByWeezy Date: Sat, 7 Mar 2026 19:39:17 +0900 Subject: [PATCH] fix(pacer-devtools): remove inline style objects to eliminate setStyleProperty dependency Solid.js compiler transforms `style={{ ... }}` object props into `setStyleProperty()` calls from solid-js/web. This function only exists in the browser build (web.js) but not the server build (server.js). Next.js resolves solid-js/web using the server condition during SSR, causing "Export setStyleProperty doesn't exist in target module" error. Fix: replace all inline style objects with goober CSS classes, and use string-based style attribute for the dynamic width value. This prevents the Solid compiler from emitting setStyleProperty calls entirely. Closes #131 Co-Authored-By: Claude Sonnet 4.6 --- packages/pacer-devtools/src/components/Shell.tsx | 8 ++------ .../pacer-devtools/src/components/StateHeader.tsx | 5 ++--- packages/pacer-devtools/src/styles/use-styles.ts | 11 +++++++++++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/packages/pacer-devtools/src/components/Shell.tsx b/packages/pacer-devtools/src/components/Shell.tsx index e7010314e..4d368a30f 100644 --- a/packages/pacer-devtools/src/components/Shell.tsx +++ b/packages/pacer-devtools/src/components/Shell.tsx @@ -76,11 +76,7 @@ export function Shell() {
-
+
Details
{entry.type}
-
+
Key
{key}
@@ -95,8 +95,7 @@ export function StateHeader(props: StateHeaderProps) {
{reductionPercentage}% reduction
diff --git a/packages/pacer-devtools/src/styles/use-styles.ts b/packages/pacer-devtools/src/styles/use-styles.ts index 3c472600d..560c855e0 100644 --- a/packages/pacer-devtools/src/styles/use-styles.ts +++ b/packages/pacer-devtools/src/styles/use-styles.ts @@ -67,6 +67,8 @@ const stylesFactory = (theme: 'light' | 'dark') => { overflow: hidden; min-height: 0; flex-shrink: 0; + min-width: 150px; + max-width: 800px; `, rightPanel: css` background: ${t(colors.gray[100], colors.darkGray[800])}; @@ -286,6 +288,15 @@ const stylesFactory = (theme: 'light' | 'dark') => { color: ${t(colors.gray[900], colors.gray[100])}; word-break: break-all; `, + stateHeaderRow: css` + display: flex; + align-items: center; + gap: 16px; + `, + reductionValue: css` + margin-left: auto; + font-weight: bold; + `, noSelection: css` flex: 1; display: flex;