Skip to content

Commit 174c1ce

Browse files
committed
Errors in module shouldn't disable live reload (fixes #29)
1 parent 9ff0cfe commit 174c1ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ module.exports = function (source) {
2424
' var getHotUpdateAPI = require(' + JSON.stringify(require.resolve('./getHotUpdateAPI')) + ');',
2525
' return getHotUpdateAPI(React, ' + JSON.stringify(filename) + ', module.id);',
2626
'})();',
27-
processedSource,
2827
'if (module.hot) {',
2928
' module.hot.accept(function (err) {',
3029
' if (err) {',
@@ -35,6 +34,7 @@ module.exports = function (source) {
3534
' var nextTick = require(' + JSON.stringify(require.resolve('next-tick')) + ');',
3635
' nextTick(__hotUpdateAPI.updateMountedInstances);',
3736
' });',
38-
'}'
37+
'}',
38+
processedSource
3939
].join('\n');
4040
};

0 commit comments

Comments
 (0)