Skip to content

Commit 028444d

Browse files
committed
Deref dedupe template module when module fn is called.
1 parent 6c50e7c commit 028444d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/optimize/DedupePlugin.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ DedupePlugin.prototype.apply = function(compiler) {
155155
"// Module can be created from a template",
156156
"modules[" + varModuleId + "] = (function(_m) {",
157157
this.indent([
158-
"var args = _m.slice(1), fn = modules[_m[0]];",
158+
"var args = _m.slice(1), templateId = _m[0];",
159159
"return function (a,b,c) {",
160160
this.indent([
161-
"fn.apply(this, [a,b,c].concat(args));"
161+
"modules[templateId].apply(this, [a,b,c].concat(args));"
162162
]),
163163
"};"
164164
]),

0 commit comments

Comments
 (0)