MCPcopy
hub / github.com/webpack/webpack / make

Function make

test/NormalModule.unittest.js:607–626  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

605 * @returns {InstanceType<typeof NormalModule>} module
606 */
607 const make = (id) => {
608 const mod = new NormalModule(
609 /** @type {import("../lib/NormalModule").NormalModuleCreateData} */ (
610 /** @type {unknown} */ ({
611 type: "javascript/auto",
612 request: `/${id}`,
613 userRequest: `/${id}`,
614 rawRequest: id,
615 loaders: [],
616 resource: `/${id}`,
617 parser: { parse() {} },
618 generator: null,
619 resolveOptions: {}
620 })
621 )
622 );
623 mod.buildMeta = { sideEffectFree: true };
624 mod.dependencies = [];
625 return mod;
626 };
627 const root = make("root");
628 const a = make("a");
629 const b = make("b");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected