Skip to content

Commit

Permalink
fix: workaround "handle" skip HMR
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Nov 12, 2023
1 parent 6005202 commit 048925e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
13 changes: 11 additions & 2 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/vite/plugin.js b/dist/vite/plugin.js
index 4d7d30ef9079e2acf0b9317a9b8245467f232149..577b1df11f5a1496c618d85fb25b7dc8579bae12 100644
index 4d7d30ef9079e2acf0b9317a9b8245467f232149..78f11127fb72dc1ef0bd6fd5453ab4b934228cac 100644
--- a/dist/vite/plugin.js
+++ b/dist/vite/plugin.js
@@ -23,7 +23,7 @@ var pick = require('lodash/pick');
Expand All @@ -10,4 +10,13 @@ index 4d7d30ef9079e2acf0b9317a9b8245467f232149..577b1df11f5a1496c618d85fb25b7dc8
+// var adapter = require('./node/adapter.js');
var styles = require('./styles.js');
var vmod = require('./vmod.js');
var removeExports = require('./remove-exports.js');
var removeExports = require('./remove-exports.js');
@@ -704,7 +704,7 @@ const remixVitePlugin = (options = {}) => {
};
function addRefreshWrapper(pluginConfig, code, id) {
let isRoute = getRoute(pluginConfig, id);
- let acceptExports = isRoute ? ["meta", "links", "shouldRevalidate"] : [];
+ let acceptExports = isRoute ? ["meta", "links", "shouldRevalidate", "handle"] : [];
return REACT_REFRESH_HEADER.replace("__SOURCE__", JSON.stringify(id)) + code + REACT_REFRESH_FOOTER.replace("__SOURCE__", JSON.stringify(id)).replace("__ACCEPT_EXPORTS__", JSON.stringify(acceptExports));
}
const REACT_REFRESH_HEADER = `
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 048925e

Please sign in to comment.