export function clearModuleCache ( module ) { if ( module && module . includes ( 'node_modules' ) ) { return ; } const mod = require . cache [ require . resolve ( module ) ] ; if ( mod ) { delete require . cache [ require . resolve ( module ) ] ; mod . children . forEach ( ( ( m ) => { clearModuleCache ( require . resolve ( m . id ) ) ; } ) ) ; } }