Closed sergesemashko closed 9 years ago
Well, you could try to add a parameter to your rendering middleware.
Like onClick
but that would be onRender
.
Pass webpackIsomorphicTools.refresh.bind(webpackIsomorphicTools)
and call it during refresh.
good idea, thanks.
Would you consider having some kind of files watcher just for development mode to clear assets cache? maybe in this case webpackIsomorphicTools.refresh();
will be not necessary at all.
I could submit a pull request If you are interested. Let me know what do you think.
No go for embedding a file watcher inside webpack-isomorphic-tools
.
In your case there are two npm packages which aren't connected to each other in any way, and still you want to have a way for one npm package to know when an event in the other npm package fires.
I guess a classic on-render listener function is the simplest solution in your case
Hello,
I have wepback configured with
webpack-isomorphic-tools
and encapsulated in npm package by custom CLI, so several projects can share the same webpack setup. Rendering middleware is outside of npm package containingwebpack-isomorphic-tools
, so I'm trying to avoid any references towebpack-isomorphic-tools
on the project level.Is there a way to keep hot module replacement feature and do not have
webpackIsomorphicTools.refresh();
in middleware in the same time?Thanks, Sergey