Skip to content

Commit 8bc2fe3

Browse files
committed
fix: es module interop in HMR code
1 parent 8b584bd commit 8bc2fe3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module.exports.pitch = function (remainingRequest) {
6868
' if(!content.locals) {',
6969
' module.hot.accept(' + request + ', function() {',
7070
' var newContent = require(' + request + ');',
71+
' if(newContent.__esModule) newContent = newContent.default;',
7172
" if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];",
7273
' update(newContent);',
7374
' });',

0 commit comments

Comments
 (0)