Skip to content

Commit

Permalink
- Fix ES6 refactoring lib/HotModuleReplacementPlugin according to cod…
Browse files Browse the repository at this point in the history
…acy coding quality review
  • Loading branch information
Kyle Truong authored and Kyle Truong committed Jul 1, 2017
1 parent c3d8fdf commit be13bf9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/HotModuleReplacementPlugin.js
Expand Up @@ -163,10 +163,10 @@ module.exports = class HotModuleReplacementPlugin {
source,
"",
hotInitCode
.replace(/\$require\$/g, this.requireFn)
.replace(/\$hash\$/g, JSON.stringify(hash))
.replace(/\$requestTimeout\$/g, requestTimeout)
.replace(/\/\*foreachInstalledChunks\*\//g, chunk.chunks.length > 0 ? "for(var chunkId in installedChunks)" : `var chunkId = ${JSON.stringify(chunk.id)};`)
.replace(/\$require\$/g, this.requireFn)
.replace(/\$hash\$/g, JSON.stringify(hash))
.replace(/\$requestTimeout\$/g, requestTimeout)
.replace(/\/\*foreachInstalledChunks\*\//g, chunk.chunks.length > 0 ? "for(var chunkId in installedChunks)" : `var chunkId = ${JSON.stringify(chunk.id)};`)
]);
});

Expand Down

0 comments on commit be13bf9

Please sign in to comment.