Skip to content

Commit

Permalink
Revert "fix: avoid key collision in React refresh registration (fix #116
Browse files Browse the repository at this point in the history
)"

This reverts commit 82b45c3.
  • Loading branch information
ArnaudBarre committed Mar 11, 2023
1 parent 82b45c3 commit b5945c9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/plugin-react/src/refreshUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ function registerExportsForReactRefresh(filename, moduleExports) {
if (key === '__esModule') continue
const exportValue = moduleExports[key]
if (exports.isLikelyComponentType(exportValue)) {
// `export` is required to avoid key collision when renamed export shadow local component name
// https://github.com/vitejs/vite-plugin-react/issues/116
exports.register(exportValue, filename + ' export ' + key)
exports.register(exportValue, filename + ' ' + key)
}
}
}
Expand Down

0 comments on commit b5945c9

Please sign in to comment.