Skip to content

Commit 1e2327f

Browse files
committed
fix: client only
1 parent f579b37 commit 1e2327f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/common/refresh-utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ export function virtualPreamblePlugin({
100100
},
101101
transform: {
102102
filter: { code: /__REACT_DEVTOOLS_GLOBAL_HOOK__/ },
103-
handler(code) {
103+
handler(code, _id, options) {
104+
if (options?.ssr) return
104105
// this is expected to be either `react` or `react-dom/client`
105106
if (isEnabled() && code.includes('__REACT_DEVTOOLS_GLOBAL_HOOK__')) {
106107
return `import ${JSON.stringify(name)};` + code

0 commit comments

Comments
 (0)