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

Lines changed: 1 addition & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy