loaders icon indicating copy to clipboard operation
loaders copied to clipboard

Differentiate between dynamic and static imports in loader hooks

Open thetutlage opened this issue 1 year ago • 1 comments

We have a very specific use-case for ESM loader hooks that we are using here with https://github.com/Julien-R44/hot-hook

hot-hook is an ESM loader that enables HMR for Node.js apps without performing any bundling or static analysis of the code.

However, hot-hook can only work with dynamic imports and hence it becomes super crictical for us to differentiate between static and dynamic imports.

Since, loader hooks are under active development, we thought to share our use-case and see if it makes broader sense for Node.js to support this.

thetutlage avatar Jun 22 '24 11:06 thetutlage

Related: #205

GeoffreyBooth avatar Jun 22 '24 21:06 GeoffreyBooth