()
| 158 | } |
| 159 | |
| 160 | function clearCache() { |
| 161 | // trigger unload hooks |
| 162 | modules.forEach((mod) => { |
| 163 | if (mod.onUnload) { |
| 164 | mod.onUnload(app); |
| 165 | } |
| 166 | }); |
| 167 | |
| 168 | // clear require cache |
| 169 | for (const entry in require.cache) { |
| 170 | if (entry.indexOf(path) === 0 || entry.indexOf(localPath) === 0) { |
| 171 | delete require.cache[entry]; |
| 172 | } |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | export {updatePlugins}; |
| 177 |
no test coverage detected