MCPcopy
hub / github.com/webpack/webpack / handleExport

Function handleExport

test/helpers/prepareOptions.js:22–32  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

20 * @returns {ConfigOrFn | Promise<ConfigOrFn>} unwrapped config value
21 */
22const handleExport = (options) => {
23 if (
24 typeof options === "object" &&
25 options !== null &&
26 "default" in options &&
27 options.default !== undefined
28 ) {
29 return options.default;
30 }
31 return /** @type {ConfigOrFn | Promise<ConfigOrFn>} */ (options);
32};
33
34/**
35 * @param {Configuration | ConfigFn} options config or config factory

Callers 1

prepareOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected