Skip to content

Commit

Permalink
fix: Normalize input module IDs to fix HMR on Windows (aklinker1#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 authored May 27, 2023
1 parent 7aa5c08 commit eedff09
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export function hmrRewritePlugin(config: {
name: HMR_REWRITE_PLUGIN_NAME,

config(config) {
inputIds = Object.values(config.build?.rollupOptions?.input ?? {});
inputIds = Object.values(config.build?.rollupOptions?.input ?? {}).map(
(inputId) => vite.normalizePath(inputId)
);

const hmrConfig: vite.InlineConfig = {
server: {
Expand Down

0 comments on commit eedff09

Please sign in to comment.