MCPcopy
hub / github.com/webpack/webpack / sourceRequests

Function sourceRequests

test/HtmlParser.unittest.js:577–584  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

575 * @returns {string[]} the requests of the emitted HtmlSourceDependency-s
576 */
577 const sourceRequests = (source) => {
578 const { module, dependencies } = makeModule();
579 buildHtmlAst.mockReturnValue(realBuildHtmlAst(source));
580 new HtmlParser({}).parse(source, makeState(module));
581 return dependencies
582 .filter((d) => d instanceof HtmlSourceDependency)
583 .map((d) => /** @type {EXPECTED_ANY} */ (d).request);
584 };
585
586 it("extracts external url() in SVG presentation attributes, skipping local/empty", () => {
587 expect(

Callers 1

Calls 3

makeStateFunction · 0.85
makeModuleFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected