Skip to content

Commit 0538ebe

Browse files
committed
fix: enable createEsmInitializer createCjsInitializer
1 parent 4e04600 commit 0538ebe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/vite/src/client/hmrModuleRunner.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ if (__FULL_BUNDLE_MODE__) {
7474
}
7575

7676
// __esmMin
77-
// createEsmInitializer = (fn, res) => () => (fn && (res = fn(fn = 0)), res)
77+
// @ts-expect-error need to add typing
78+
createEsmInitializer = (fn, res) => () => (fn && (res = fn((fn = 0))), res)
7879
// __commonJSMin
79-
// createCjsInitializer = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports)
80+
// @ts-expect-error need to add typing
81+
createCjsInitializer = (cb, mod) => () => (
82+
mod || cb((mod = { exports: {} }).exports, mod), mod.exports
83+
)
8084
}
8185

8286
// @ts-expect-error __rolldown_runtime__

0 commit comments

Comments
 (0)