MCPcopy
hub / github.com/zh-lx/code-inspector / WebpackCodeInspectorLoader

Function WebpackCodeInspectorLoader

packages/webpack/src/loader.ts:112–129  ·  view source on GitHub ↗
(
  content: string,
  source: any,
  meta: any,
)

Source from the content-addressed store, hash-verified

110}
111
112export default function WebpackCodeInspectorLoader(
113 content: string,
114 source: any,
115 meta: any,
116): Promise<string> | undefined {
117 this.cacheable && this.cacheable(true);
118 const callback = this.async?.();
119 const result = transformWebpackCodeInspectorContent(this, content).catch(
120 () => content,
121 );
122
123 if (callback) {
124 result.then((code) => callback(null, code, source, meta));
125 return undefined;
126 }
127
128 return result;
129}

Callers

nothing calls this directly

Tested by

no test coverage detected