Skip to content

Commit 6593719

Browse files
committed
fix: react plugin get module exports
1 parent 5d0abd5 commit 6593719

File tree

1 file changed

+2
-2
lines changed
  • packages/vite/src/shared

1 file changed

+2
-2
lines changed

packages/vite/src/shared/hmr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ export class HMRContext implements ViteHotContext {
155155
this.hmrClient.send({ type: 'custom', event, data })
156156
}
157157

158-
async getExports(): Promise<unknown> {
158+
async getExports(url: string): Promise<unknown> {
159159
return this.fullBundleMode
160160
? Promise.resolve().then(() =>
161161
// @ts-expect-error __rolldown_runtime__
162162
__rolldown_runtime__.loadExports(this.ownerPath),
163163
)
164-
: import(this.ownerPath)
164+
: import(url)
165165
}
166166

167167
private acceptDeps(

0 commit comments

Comments
 (0)