未验证 提交 0e68d3c2 编写于 作者: J Joe Haddad 提交者: GitHub

Adjust all modules identified plugin output (#6995)

This output clashed with the new output style. This output is more inline with existing behavior.
上级 c2c634ca
import { Compiler, Plugin } from 'webpack'
import { createHash } from 'crypto'
import path from 'path'
import { Compiler, Plugin } from 'webpack'
/**
* From escape-string-regexp: https://github.com/sindresorhus/escape-string-regexp
......@@ -8,13 +8,13 @@ import path from 'path'
* MIT License
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
*/
const matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
const matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g
const escapeRegex = (str: string) => {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
};
if (typeof str !== 'string') {
throw new TypeError('Expected a string')
}
return str.replace(matchOperatorsRe, '\\$&')
}
function getRawModuleIdentifier(m: any, dir: string) {
// webpack impl:
......@@ -38,7 +38,7 @@ function getRawModuleIdentifier(m: any, dir: string) {
const identifier = `${context}::${request}`
console.warn(
`[module identifier] RawModule ${m.identifier()} => ${identifier}`
`> module identifier: RawModule ${m.identifier()} => ${identifier}`
)
return identifier
}
......@@ -58,7 +58,7 @@ function getMultiModuleIdentifier(m: any) {
const identifier = ids.sort().join('::')
console.warn(
`[module identifier] MultiModule ${m.identifier()} => ${identifier}`
`> module identifier: MultiModule ${m.identifier()} => ${identifier}`
)
return identifier
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册