JS require - reload?

16 views
Skip to first unread message

ad...@cs.miami.edu

unread,
Sep 24, 2016, 1:23:42 AM9/24/16
to vert.x
Hi,

Using "require" to load a javascript utility in vertx, is it possible to reload a such a module loaded with "require"? If I change the file, and the reuqire it again, the changes are not loaded (this is a good thing as it avoids IO).  But, what if I need to change the javascript code that is loaded with require? Is the only way to restart vertx? Or is there another way to do it?

-Adam

Paulo Lopes

unread,
Sep 26, 2016, 5:46:43 AM9/26/16
to vert.x
No, as with NodeJS the require function caches code as per commonjs definition.
Reply all
Reply to author
Forward
0 new messages