Skip to content

Commit

Permalink
(debug) debug handleHotUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 11, 2024
1 parent d133944 commit 10196df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/remix-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ const getRouteModuleExports = async (
let [, exports] = esModuleLexer(transformed.code);
let exportNames = exports.map((e) => e.n);

if (exportNames.length === 0) {
console.log("[getRouteMetadata:empty]", { routeFile, code });
}

return exportNames;
};

Expand Down Expand Up @@ -1383,6 +1387,7 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
] as const
).some((key) => oldRouteMetadata[key] !== newRouteMetadata[key])
) {
console.log("[handleHotUpdate:invalidateVirtualModules]", { file, oldRouteMetadata, newRouteMetadata });
invalidateVirtualModules(server);
}
}
Expand Down

0 comments on commit 10196df

Please sign in to comment.