FredKSchott / esm-hmr

a Hot Module Replacement (HMR) API for your ESM-based dev server.
MIT License
413 stars 11 forks source link

Duplicate Callbacks #28

Open TomokiMiyauci opened 2 months ago

TomokiMiyauci commented 2 months ago

If an API is called with the same callback, how should this be handled?

The current implementation does not take duplicates into account.

An example is EventTarger#addEventListener. Since addEventListener is similar to the usage scenario of import.meta.hot API, it would be helpful as an example to consider duplication.

When considering duplication, the equivalence of accept of deps must also be considered.