Repository: webpack/webpack
Pull request #9391 (2019-07-10 10:18:51)

esdoc(createHash)
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->

https://github.com/webpack/webpack/issues/9196

<!-- In addition to that please answer these questions: -->

**What kind of change does this PR introduce?**

esdoc
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->

**Did you add tests for your changes?**

No
<!-- Note that we won't merge your changes if you don't add tests -->

**Does this PR introduce a breaking change?**

No
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->

**What needs to be documented once your changes are merged?**

Nothing
<!-- List all the information that needs to be added to the documentation after merge -->
<!-- When your changes are merged you will be asked to contribute this to the documentation -->


webpack-bot: <!-- identifier: admin-actions -->

*For maintainers only:*

* [ ] <!-- document --> This need to be documented (issue in webpack/webpack.js.org will be filed when merged)
webpack-bot: <!-- identifier: ci-result -->

@vankop The most important CI builds failed. This way your PR can't be merged.

Please take a look at the CI results from [travis](https://travis-ci.org/webpack/webpack/builds/556731882?utm_source&#x3D;github_status&amp;utm_medium&#x3D;notification) (failure) and [appveyor](https://ci.appveyor.com/project/sokra/webpack/builds/25873603) (success) and fix these issues.

Patch:
diff --git a/.eslintrc.js b/.eslintrc.js
index c971aa16e..d2aaef6b9 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -71,7 +71,8 @@ module.exports = {
 					};
 					return acc;
 				}, {})),
-				extends: "extends"
+				extends: "extends",
+				constructor: "constructor"
 			}
 		}
 	},
diff --git a/declarations/WebpackOptions.d.ts b/declarations/WebpackOptions.d.ts
index bba927cd2..617bf4513 100644
--- a/declarations/WebpackOptions.d.ts
+++ b/declarations/WebpackOptions.d.ts
@@ -1094,7 +1094,7 @@ export interface OutputOptions {
 	/**
 	 * Algorithm used for generation the hash (see node.js crypto package)
 	 */
-	hashFunction?: string | (new () => import("../lib/util/createHash").Hash);
+	hashFunction?: string | import("../lib/util/createHash").HashConstructor;
 	/**
 	 * Any string which is added to the hash to salt it
 	 */
diff --git a/lib/AbstractMethodError.js b/lib/AbstractMethodError.js
new file mode 100644
index 000000000..c9eb9cffb
--- /dev/null
+++ b/lib/AbstractMethodError.js
@@ -0,0 +1,43 @@
+"use strict";
+
+const WebpackError = require("./WebpackError");
+const CURRENT_METHOD_REGEXP = /at ([a-zA-Z0-9_.]*)/;
+
+/**
+ * @param {string=} method method name
+ * @returns {string} message
+ */
+function createMessage(method) {
+	return `Abstract method${method ? " " + method : ""}. Must be overridden.`;
+}
+
+/**
+ * @constructor
+ */
+function Message() {
+	this.stack = undefined;
+	Error.captureStackTrace(this);
+	/** @type {RegExpMatchArray} */
+	const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP);
+
+	this.message = match && match[1] ? createMessage(match[1]) : createMessage();
+}
+
+/**
+ * Error for abstract method
+ * @example
+ * class FooClass {
+ *     abstractMethod() {
+ *         throw new AbstractMethodError(); // error message: Abstract method FooClass.abstractMethod. Must be overriden.
+ *     }
+ * }
+ *
+ */
+class AbstractMethodError extends WebpackError {
+	constructor() {
+		super(new Message().message);
+		this.name = "AbstractMethodError";
+	}
+}
+
+module.exports = AbstractMethodError;
diff --git a/lib/Compilation.js b/lib/Compilation.js
index 80ef083e3..a56b0a9c4 100644
--- a/lib/Compilation.js
+++ b/lib/Compilation.js
@@ -2294,7 +2294,7 @@ class Compilation extends Tapable {
 			const module = modules[i];
 			const moduleHash = createHash(hashFunction);
 			module.updateHash(moduleHash);
-			module.hash = moduleHash.digest(hashDigest);
+			module.hash = /** @type {string} */ (moduleHash.digest(hashDigest));
 			module.renderedHash = module.hash.substr(0, hashDigestLength);
 		}
 		// clone needed as sort below is inplace mutation
@@ -2329,7 +2329,7 @@ class Compilation extends Tapable {
 					this.dependencyTemplates
 				);
 				this.hooks.chunkHash.call(chunk, chunkHash);
-				chunk.hash = chunkHash.digest(hashDigest);
+				chunk.hash = /** @type {string} */ (chunkHash.digest(hashDigest));
 				hash.update(chunk.hash);
 				chunk.renderedHash = chunk.hash.substr(0, hashDigestLength);
 				this.hooks.contentHash.call(chunk);
@@ -2337,7 +2337,7 @@ class Compilation extends Tapable {
 				this.errors.push(new ChunkRenderError(chunk, "", err));
 			}
 		}
-		this.fullHash = hash.digest(hashDigest);
+		this.fullHash = /** @type {string} */ (hash.digest(hashDigest));
 		this.hash = this.fullHash.substr(0, hashDigestLength);
 	}
 
@@ -2353,7 +2353,7 @@ class Compilation extends Tapable {
 		const hash = createHash(hashFunction);
 		hash.update(this.fullHash);
 		hash.update(update);
-		this.fullHash = hash.digest(hashDigest);
+		this.fullHash = /** @type {string} */ (hash.digest(hashDigest));
 		this.hash = this.fullHash.substr(0, hashDigestLength);
 	}
 
diff --git a/lib/HashedModuleIdsPlugin.js b/lib/HashedModuleIdsPlugin.js
index 0c720c181..7a860f74f 100644
--- a/lib/HashedModuleIdsPlugin.js
+++ b/lib/HashedModuleIdsPlugin.js
@@ -45,7 +45,9 @@ class HashedModuleIdsPlugin {
 							});
 							const hash = createHash(options.hashFunction);
 							hash.update(id);
-							const hashId = hash.digest(options.hashDigest);
+							const hashId = /** @type {string} */ (hash.digest(
+								options.hashDigest
+							));
 							let len = options.hashDigestLength;
 							while (usedIds.has(hashId.substr(0, len))) len++;
 							module.id = hashId.substr(0, len);
diff --git a/lib/JavascriptModulesPlugin.js b/lib/JavascriptModulesPlugin.js
index 07030c9a3..2c1bbe4d4 100644
--- a/lib/JavascriptModulesPlugin.js
+++ b/lib/JavascriptModulesPlugin.js
@@ -148,9 +148,8 @@ class JavascriptModulesPlugin {
 							hash.update(m.hash);
 						}
 					}
-					chunk.contentHash.javascript = hash
-						.digest(hashDigest)
-						.substr(0, hashDigestLength);
+					const digest = /** @type {string} */ (hash.digest(hashDigest));
+					chunk.contentHash.javascript = digest.substr(0, hashDigestLength);
 				});
 			}
 		);
diff --git a/lib/ModuleFilenameHelpers.js b/lib/ModuleFilenameHelpers.js
index 105e89e3f..bd0742b7f 100644
--- a/lib/ModuleFilenameHelpers.js
+++ b/lib/ModuleFilenameHelpers.js
@@ -44,7 +44,8 @@ const getBefore = (str, token) => {
 const getHash = str => {
 	const hash = createHash("md4");
 	hash.update(str);
-	return hash.digest("hex").substr(0, 4);
+	const digest = /** @type {string} */ (hash.digest("hex"));
+	return digest.substr(0, 4);
 };
 
 const asRegExp = test => {
diff --git a/lib/NamedModulesPlugin.js b/lib/NamedModulesPlugin.js
index a3857ac8e..2d84aafe2 100644
--- a/lib/NamedModulesPlugin.js
+++ b/lib/NamedModulesPlugin.js
@@ -10,7 +10,8 @@ const RequestShortener = require("./RequestShortener");
 const getHash = str => {
 	const hash = createHash("md4");
 	hash.update(str);
-	return hash.digest("hex").substr(0, 4);
+	const digest = /** @type {string} */ (hash.digest("hex"));
+	return digest.substr(0, 4);
 };
 
 class NamedModulesPlugin {
diff --git a/lib/NormalModule.js b/lib/NormalModule.js
index ec54e07c8..ba8d31819 100644
--- a/lib/NormalModule.js
+++ b/lib/NormalModule.js
@@ -405,7 +405,7 @@ class NormalModule extends Module {
 		}
 		hash.update("meta");
 		hash.update(JSON.stringify(this.buildMeta));
-		this._buildHash = hash.digest("hex");
+		this._buildHash = /** @type {string} */ (hash.digest("hex"));
 	}
 
 	build(options, compilation, resolver, fs, callback) {
diff --git a/lib/SourceMapDevToolPlugin.js b/lib/SourceMapDevToolPlugin.js
index 168bd3f8b..ceaf8a1a5 100644
--- a/lib/SourceMapDevToolPlugin.js
+++ b/lib/SourceMapDevToolPlugin.js
@@ -321,7 +321,7 @@ class SourceMapDevToolPlugin {
 								query = filename.substr(idx);
 								filename = filename.substr(0, idx);
 							}
-							const pathParams = {
+							let sourceMapFile = compilation.getPath(sourceMapFilename, {
 								chunk,
 								filename: options.fileContext
 									? path.relative(options.fileContext, filename)
@@ -331,11 +331,7 @@ class SourceMapDevToolPlugin {
 								contentHash: createHash("md4")
 									.update(sourceMapString)
 									.digest("hex")
-							};
-							let sourceMapFile = compilation.getPath(
-								sourceMapFilename,
-								pathParams
-							);
+							});
 							const sourceMapUrl = options.publicPath
 								? options.publicPath + sourceMapFile.replace(/\\/g, "/")
 								: path
@@ -347,9 +343,9 @@ class SourceMapDevToolPlugin {
 							if (currentSourceMappingURLComment !== false) {
 								assets[file] = compilation.assets[file] = new ConcatSource(
 									new RawSource(source),
-									compilation.getPath(
-										currentSourceMappingURLComment,
-										Object.assign({ url: sourceMapUrl }, pathParams)
+									currentSourceMappingURLComment.replace(
+										/\[url\]/g,
+										sourceMapUrl
 									)
 								);
 							}
diff --git a/lib/TemplatedPathPlugin.js b/lib/TemplatedPathPlugin.js
index 9fc1053a1..8cd1ef40a 100644
--- a/lib/TemplatedPathPlugin.js
+++ b/lib/TemplatedPathPlugin.js
@@ -13,8 +13,7 @@ const REGEXP_HASH = /\[hash(?::(\d+))?\]/gi,
 	REGEXP_MODULEID = /\[moduleid\]/gi,
 	REGEXP_FILE = /\[file\]/gi,
 	REGEXP_QUERY = /\[query\]/gi,
-	REGEXP_FILEBASE = /\[filebase\]/gi,
-	REGEXP_URL = /\[url\]/gi;
+	REGEXP_FILEBASE = /\[filebase\]/gi;
 
 // Using global RegExp for .test is dangerous
 // We use a normal RegExp instead of .test
@@ -112,8 +111,6 @@ const replacePathVariables = (path, data) => {
 			.replace(REGEXP_FILEBASE, getReplacer(data.basename))
 			// query is optional, it's OK if it's in a path but there's nothing to replace it with
 			.replace(REGEXP_QUERY, getReplacer(data.query, true))
-			// only available in sourceMappingURLComment
-			.replace(REGEXP_URL, getReplacer(data.url))
 	);
 };
 
diff --git a/lib/util/createHash.js b/lib/util/createHash.js
index fa18ffd8d..64de510da 100644
--- a/lib/util/createHash.js
+++ b/lib/util/createHash.js
@@ -4,21 +4,50 @@
 */
 "use strict";
 
-/** @typedef {{new(): Hash}} HashConstructor */
-/**
- * @typedef {Object} Hash
- * @property {function(string|Buffer, string=): Hash} update
- * @property {function(string): string} digest
- */
+const AbstractMethodError = require("../AbstractMethodError");
 
 const BULK_SIZE = 1000;
 
-class BulkUpdateDecorator {
+class Hash {
+	/**
+	 * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
+	 * @param {string|Buffer} data data
+	 * @param {string=} inputEncoding data encoding
+	 * @returns {this} updated hash
+	 */
+	update(data, inputEncoding) {
+		throw new AbstractMethodError();
+	}
+
+	/**
+	 * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
+	 * @param {string=} encoding encoding of the return value
+	 * @returns {string|Buffer} digest
+	 */
+	digest(encoding) {
+		throw new AbstractMethodError();
+	}
+}
+
+exports.Hash = Hash;
+/** @typedef {typeof Hash} HashConstructor */
+
+class BulkUpdateDecorator extends Hash {
+	/**
+	 * @param {Hash} hash hash
+	 */
 	constructor(hash) {
+		super();
 		this.hash = hash;
 		this.buffer = "";
 	}
 
+	/**
+	 * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
+	 * @param {string|Buffer} data data
+	 * @param {string=} inputEncoding data encoding
+	 * @returns {this} updated hash
+	 */
 	update(data, inputEncoding) {
 		if (
 			inputEncoding !== undefined ||
@@ -40,6 +69,11 @@ class BulkUpdateDecorator {
 		return this;
 	}
 
+	/**
+	 * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
+	 * @param {string=} encoding encoding of the return value
+	 * @returns {string|Buffer} digest
+	 */
 	digest(encoding) {
 		if (this.buffer.length > 0) {
 			this.hash.update(this.buffer);
@@ -51,18 +85,32 @@ class BulkUpdateDecorator {
 	}
 }
 
-/* istanbul ignore next */
-class DebugHash {
+/**
+ * istanbul ignore next
+ */
+class DebugHash extends Hash {
 	constructor() {
+		super();
 		this.string = "";
 	}
 
+	/**
+	 * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
+	 * @param {string|Buffer} data data
+	 * @param {string=} inputEncoding data encoding
+	 * @returns {this} updated hash
+	 */
 	update(data, inputEncoding) {
 		if (typeof data !== "string") data = data.toString("utf-8");
 		this.string += data;
 		return this;
 	}
 
+	/**
+	 * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
+	 * @param {string=} encoding encoding of the return value
+	 * @returns {string|Buffer} digest
+	 */
 	digest(encoding) {
 		return this.string.replace(/[^a-z0-9]+/gi, m =>
 			Buffer.from(m).toString("hex")
diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json
index daafe6004..81ad90937 100644
--- a/schemas/WebpackOptions.json
+++ b/schemas/WebpackOptions.json
@@ -905,7 +905,7 @@
             },
             {
               "instanceof": "Function",
-              "tsType": "(new () => import('../lib/util/createHash').Hash)"
+              "tsType": "import('../lib/util/createHash').HashConstructor"
             }
           ]
         },
diff --git a/yarn.lock b/yarn.lock
index b3cbbd1b7..474e56466 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1658,12 +1658,12 @@ cosmiconfig@^5.0.7, cosmiconfig@^5.2.0:
     parse-json "^4.0.0"
 
 coveralls@^3.0.2:
-  version "3.0.5"
-  resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.5.tgz#28d7274c6c9827aa85537eab82d66e7e62d0d527"
-  integrity sha512-/KD7PGfZv/tjKB6LoW97jzIgFqem0Tu9tZL9/iwBnBd8zkIZp7vT1ZSHNvnr0GSQMV/LTMxUstWg8WcDDUVQKg==
+  version "3.0.4"
+  resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.4.tgz#f50233c9c62fd0973f710fce85fd19dba24cff4b"
+  integrity sha512-eyqUWA/7RT0JagiL0tThVhjbIjoiEUyWCjtUJoOPcWoeofP5WK/jb2OJYoBFrR6DvplR+AxOyuBqk4JHkk5ykA==
   dependencies:
     growl "~> 1.10.0"
-    js-yaml "^3.13.1"
+    js-yaml "^3.11.0"
     lcov-parse "^0.0.10"
     log-driver "^1.2.7"
     minimist "^1.2.0"
@@ -2201,16 +2201,16 @@ eslint-plugin-jest@^22.2.2:
   integrity sha512-Aecqe3ulBVI7amgOycVI8ZPL8o0SnGHOf3zn2/Ciu8TXyXDHcjtwD3hOs3ss/Qh/VAwlW/DMcuiXg5btgF+XMA==
 
 eslint-plugin-jsdoc@^15.3.2:
-  version "15.3.9"
-  resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-15.3.9.tgz#249f970c16724ca614c0e7032df4133255e4ca96"
-  integrity sha512-+AtEL1H6bA5cXLHOFh/h3sy6scJ7QMNlTUXYm88nQZfNtsXfc6Is97IgMkqOSeoisLfbUZOCUIV0yXgg2TyYOA==
+  version "15.3.2"
+  resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-15.3.2.tgz#222e3013101c59ebf10b49fb2d2accf5e5eae677"
+  integrity sha512-EpdXvRO5oS1mxsD8Jhkq4f3f5ZwM+OxJl7J93cw2H+XlZpu41Gl5n+dohDnG1poq7x6HRp3ONXHFWNHZ5n4Wnw==
   dependencies:
     comment-parser "^0.5.5"
     debug "^4.1.1"
     escape-regex-string "^1.0.6"
     flat-map-polyfill "^0.3.8"
     jsdoctypeparser "5.0.1"
-    lodash "^4.17.14"
+    lodash "^4.17.11"
     regextras "^0.6.1"
 
 eslint-plugin-node@^8.0.0:
@@ -3940,7 +3940,7 @@ js-stringify@^1.0.1:
   resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
   integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
 
-js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.12.1, js-yaml@^3.13.0, js-yaml@^3.13.1:
+js-yaml@3.x, js-yaml@^3.11.0, js-yaml@^3.12.0, js-yaml@^3.12.1, js-yaml@^3.13.0, js-yaml@^3.13.1:
   version "3.13.1"
   resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
   integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
@@ -4324,10 +4324,10 @@ lodash.sortby@^4.7.0:
   resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
   integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
 
-lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.4:
-  version "4.17.14"
-  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba"
-  integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==
+lodash@^4.17.11, lodash@^4.17.4:
+  version "4.17.11"
+  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
+  integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
 
 log-driver@^1.2.7:
   version "1.2.7"
@@ -6154,9 +6154,9 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
   integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
 
 simple-git@^1.65.0, simple-git@^1.85.0:
-  version "1.120.0"
-  resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.120.0.tgz#3323a763ee88f9733bd928a65cb6eb2982f64c53"
-  integrity sha512-caF3eLrUSrL6d5fBVU85bmY0lpbMpbkWze1W2Tg946kN75s/WWvKqpc4Agn3DLHyzXEeiWfv8yPULiCKumuIQg==
+  version "1.118.0"
+  resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.118.0.tgz#6e31d50672c58abdbdb0410fadfdb1db29bd71bd"
+  integrity sha512-0CaCfxdR7ula3EuOkrVFKBiqt7LcvMPfXgIdUhSwjC4A+OaO8yEPGjdO/kWY7ew9uYP9KEoH+dvslOOm7eVzkA==
   dependencies:
     debug "^4.0.1"
 


Test patch:
diff --git a/test/AbstractMethodError.unittest.js b/test/AbstractMethodError.unittest.js
new file mode 100644
index 000000000..862a28604
--- /dev/null
+++ b/test/AbstractMethodError.unittest.js
@@ -0,0 +1,27 @@
+"use strict";
+
+const AbstractMethodError = require("../lib/AbstractMethodError");
+
+describe("WebpackError", () => {
+	class Foo {
+		abstractMethod() {
+			return new AbstractMethodError();
+		}
+	}
+
+	class Child extends Foo {}
+
+	const expectedMessage = "Abstract method $1. Must be overridden.";
+
+	it("Should construct message with caller info", () => {
+		const fooClassError = new Foo().abstractMethod();
+		const childClassError = new Child().abstractMethod();
+
+		expect(fooClassError.message).toBe(
+			expectedMessage.replace("$1", "Foo.abstractMethod")
+		);
+		expect(childClassError.message).toBe(
+			expectedMessage.replace("$1", "Child.abstractMethod")
+		);
+	});
+});
diff --git a/test/configCases/plugins/source-map-dev-tool-plugin~append/index.js b/test/configCases/plugins/source-map-dev-tool-plugin~append/index.js
deleted file mode 100644
index 845a13bc4..000000000
--- a/test/configCases/plugins/source-map-dev-tool-plugin~append/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-it("should have [file] replaced with chunk filename in append", function() {
-	var fs = require("fs"),
-			path = require("path");
-	var source = fs.readFileSync(path.join(__dirname, "some-test.js"), "utf-8");
-	expect(source).toMatch("//# sourceMappingURL=http://localhost:50505/some-test.js.map");
-});
diff --git a/test/configCases/plugins/source-map-dev-tool-plugin~append/test.js b/test/configCases/plugins/source-map-dev-tool-plugin~append/test.js
deleted file mode 100644
index 173957736..000000000
--- a/test/configCases/plugins/source-map-dev-tool-plugin~append/test.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var testObject = {
-	a: 1
-};
-
-module.exports = testObject;
diff --git a/test/configCases/plugins/source-map-dev-tool-plugin~append/webpack.config.js b/test/configCases/plugins/source-map-dev-tool-plugin~append/webpack.config.js
deleted file mode 100644
index 6942bf0dd..000000000
--- a/test/configCases/plugins/source-map-dev-tool-plugin~append/webpack.config.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var webpack = require("../../../../");
-var TerserPlugin = require("terser-webpack-plugin");
-module.exports = {
-	node: {
-		__dirname: false,
-		__filename: false
-	},
-	entry: {
-		bundle0: ["./index.js"],
-		"some-test": ["./test.js"]
-	},
-	output: {
-		filename: "[name].js"
-	},
-	optimization: {
-		minimizer: [
-			new TerserPlugin({
-				sourceMap: true
-			})
-		]
-	},
-	plugins: [
-		new webpack.SourceMapDevToolPlugin({
-			filename: "sourcemaps/[file].map",
-			append: "\n//# sourceMappingURL=http://localhost:50505/[file].map"
-		})
-	]
-};