Unverified Commit 0e68d3c2 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Adjust all modules identified plugin output (#6995)

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