Apply suggestions from code review
Co-Authored-By: Tobias Koppers <tobias.koppers@googlemail.com>
This commit is contained in:
parent
362e5d37d6
commit
d8754873f6
|
@ -56,7 +56,7 @@ const getReplacer = (value, allowEmpty) => {
|
|||
const escapePathVariables = value => {
|
||||
return typeof value === "string"
|
||||
? value.replace(
|
||||
/\[(name|id|moduleid|file|query|filebase|url|hash|chunkhash|modulehash|contenthash)\]/g,
|
||||
/\[(\\*[\w:]+\\*)\]/gi,
|
||||
"[\\$1\\]"
|
||||
)
|
||||
: value;
|
||||
|
|
|
@ -231,14 +231,14 @@ describe("HotModuleReplacementPlugin", () => {
|
|||
});
|
||||
fs.writeFileSync(entryFile, "1", "utf-8");
|
||||
compiler.run((err, stats) => {
|
||||
if (err) throw err;
|
||||
if (err) return done(err);
|
||||
fs.writeFileSync(statsFile3, stats.toString());
|
||||
compiler.run((err, stats) => {
|
||||
if (err) throw err;
|
||||
if (err) return done(err);
|
||||
fs.writeFileSync(statsFile4, stats.toString());
|
||||
fs.writeFileSync(entryFile, "2", "utf-8");
|
||||
compiler.run((err, stats) => {
|
||||
if (err) throw err;
|
||||
if (err) return done(err);
|
||||
fs.writeFileSync(statsFile3, stats.toString());
|
||||
|
||||
let foundUpdates = false;
|
||||
|
|
Loading…
Reference in New Issue