MCPcopy
hub / github.com/webpack/webpack / handler

Function handler

test/configCases/library/1-use-library/webpack.config.js:34–46  ·  view source on GitHub ↗
(compilation)

Source from the content-addressed store, hash-verified

32 * @returns {void}
33 */
34 const handler = (compilation) => {
35 compilation.hooks.afterProcessAssets.tap("testcase", (assets) => {
36 for (const asset of Object.keys(assets)) {
37 const source = assets[asset].source();
38 expect(source).not.toContain('"a"');
39 expect(source).not.toContain('"b"');
40 expect(source).not.toContain('"non-external"');
41 // expect pure ESM export without webpack runtime
42 expect(source).not.toContain('"__webpack_exports__"');
43 expect(source).not.toContain(".exports=");
44 }
45 });
46 };
47 this.hooks.compilation.tap("testcase", handler);
48 }
49 ]

Callers 1

_dispatchEventMethod · 0.50

Calls 3

tapMethod · 0.80
sourceMethod · 0.80
keysMethod · 0.65

Tested by

no test coverage detected