diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index 2c5cf6ebc38..d583787ac13 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -201,7 +201,7 @@ class WebpackOptionsApply extends OptionsApply { } if (options.output.library || options.output.libraryTarget !== "var") { - let LibraryTemplatePlugin = require("./LibraryTemplatePlugin"); + const LibraryTemplatePlugin = require("./LibraryTemplatePlugin"); new LibraryTemplatePlugin( options.output.library, options.output.libraryTarget, @@ -245,7 +245,7 @@ class WebpackOptionsApply extends OptionsApply { : modern ? "\n//# source" + "MappingURL=[url]" : null; - let Plugin = evalWrapped + const Plugin = evalWrapped ? EvalSourceMapDevToolPlugin : SourceMapDevToolPlugin; new Plugin({ @@ -381,7 +381,7 @@ class WebpackOptionsApply extends OptionsApply { new WarnCaseSensitiveModulesPlugin().apply(compiler); if (options.cache) { - let CachePlugin = require("./CachePlugin"); + const CachePlugin = require("./CachePlugin"); new CachePlugin( typeof options.cache === "object" ? options.cache : null ).apply(compiler);