Skip to content

Commit aa39f79

Browse files
Add 'id' attribute to require.context (so HMR can accept a context)
1 parent 2eed596 commit aa39f79

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎lib/ContextModule.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ ContextModule.prototype.source = function(dependencyTemplates, outputOptions, re
9393
"function webpackContextResolve(req) {\n",
9494
"\treturn map[req] || (function() { throw new Error(\"Cannot find module '\" + req + \"'.\") }());\n",
9595
"};\n",
96+
"webpackContext.id = "+this.id+"\n",
9697
"webpackContext.keys = function webpackContextKeys() {\n",
9798
"\treturn Object.keys(map);\n",
9899
"};\n",

0 commit comments

Comments
 (0)