Skip to content

Commit 0a9f98c

Browse files
committed
fixes #75
1 parent f8674d4 commit 0a9f98c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hot-reloader.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ class HotReloader extends Emitter {
234234
this.currentHotReload = null
235235
d('all reimported in ', new Date().getTime() - start, 'ms')
236236
}, (err) => {
237+
Object.keys(this.modulesJustDeleted).forEach((modName) => {
238+
d('deleting on failed reimport: ', modName) // failed import of a module leaves something in the SystemJS module cache, even though it is not visible in System._loader.moduleRecords we need to delete the module to revert to clean state
239+
System.delete(modName)
240+
})
237241
this.emit('error', err)
238242
console.error('Module "' + toReimport + '" reimport failed because this error was thrown: ', err)
239243
this.failedReimport = toReimport

0 commit comments

Comments
 (0)