Skip to content

Commit 1132ca9

Browse files
committed
Merge pull request webpack#361 from mzgoddard/dedupe-plugin-late-module-fn
Deref dedupe template module when module fn is called.
2 parents 03c87c1 + 028444d commit 1132ca9

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)