Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refacor hmr accept api #170

Merged
merged 7 commits into from
May 18, 2020
Merged

fix: refacor hmr accept api #170

merged 7 commits into from
May 18, 2020

Conversation

underfin
Copy link
Member

@underfin underfin commented May 17, 2020

fix #158

const existing = jsUpdateMap.get(dep) || []
existing.push({ id, deps, callback })
jsUpdateMap.set(dep, existing)
}
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the deps module update,hmr should invoke callback.Like this case, B update should invoke callback.
Before the implement is only invoke callback when A update.

 hot.accept('A', 'B',() => {
//
  });

@underfin underfin changed the title Fix 158 fix: refacor hmr accept api May 17, 2020
@yyx990803 yyx990803 merged commit 59da38c into vitejs:master May 18, 2020
@underfin underfin deleted the fix-158 branch May 19, 2020 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only last hot.accept callback function is called
2 participants