Skip to content

Commit

Permalink
chore: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Nov 11, 2024
1 parent 24a995f commit e2046f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vite/src/node/server/environments/rolldown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,11 @@ function reactRefreshPlugin(
},
},
async handler(id) {
if (!rolldownDevOptions.reactRefresh) {
return `export {}`
}
const resolved = require.resolve('react-refresh/runtime')
if (id === '\0virtual:react-refresh/entry') {
if (!rolldownDevOptions.reactRefresh) {
return `export {}`
}
return `
import runtime from ${JSON.stringify(resolved)};
runtime.injectIntoGlobalHook(window);
Expand Down

0 comments on commit e2046f0

Please sign in to comment.