MCPcopy
hub / github.com/webpack/webpack / getCurrentLoaderName

Method getCurrentLoaderName

lib/NormalModule.js:1141–1148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1139 _createLoaderContext(resolver, options, compilation, fs, hooks) {
1140 const { requestShortener } = compilation.runtimeTemplate;
1141 const getCurrentLoaderName = () => {
1142 const currentLoader = this.getCurrentLoader(
1143 /** @type {AnyLoaderContext} */
1144 (loaderContext)
1145 );
1146 if (!currentLoader) return "(not in loader scope)";
1147 return requestShortener.shorten(currentLoader.loader);
1148 };
1149 /**
1150 * @returns {ResolveContext} resolve context
1151 */

Callers

nothing calls this directly

Calls 2

getCurrentLoaderMethod · 0.95
shortenMethod · 0.80

Tested by

no test coverage detected