Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 9896d76

Browse files
committed
refactor: accept hot modules from xml loader
1 parent fa6158d commit 9896d76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xml-namespace-loader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ module.exports = function (source) {
8282
.replace(/\u2028/g, '\\u2028')
8383
.replace(/\u2029/g, '\\u2029');
8484

85-
const wrapped = `${moduleRegisters}\nmodule.exports = ${json}`;
85+
const hmr = `module.hot && module.hot.accept();`;
86+
const wrapped = `${moduleRegisters}\nmodule.exports = ${json};${hmr}`;
8687

8788
this.callback(null, wrapped);
8889
}

0 commit comments

Comments
 (0)