Skip to content

Commit e2861c9

Browse files
committed
fix: skip self
1 parent 5d415ce commit e2861c9

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
@@ -96,8 +96,9 @@ export function virtualPreamblePlugin({
9696
},
9797
transform: {
9898
filter: { code: /__REACT_DEVTOOLS_GLOBAL_HOOK__/ },
99-
handler(code, _id, options) {
99+
handler(code, id, options) {
100100
if (options?.ssr) return
101+
if (id === runtimePublicPath) return
101102

102103
// this is expected to match `react`, `react-dom`, and `react-dom/client`.
103104
// they are all optimized to be esm during dev.

0 commit comments

Comments
 (0)