Closed matthewryanscott closed 9 years ago
Cooooool, nice catch.
There's probably a performance overhead with scrapping Node's cache of the module, but this would be pretty essential in development.
Hmm, I wonder if this works recursively. Ultimately we might need something like http://stackoverflow.com/a/14801711 which walks along and removes everything that the entry point required as well.
Might be worth calling require.resolve(...) to get the real path to the file and checking the last modified date. http://stackoverflow.com/a/7559586
Useful to set to True when you have DEBUG=True.
Defaults to False.