MCPcopy
hub / github.com/webpack/webpack / getDefaultConfig

Function getDefaultConfig

test/Defaults.unittest.js:88–98  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

86 * @returns {WebpackOptionsNormalized} normalized configuration
87 */
88const getDefaultConfig = (config) => {
89 const { applyWebpackOptionsDefaults, getNormalizedWebpackOptions } =
90 require("..").config;
91
92 const normalized = getNormalizedWebpackOptions(
93 /** @type {EXPECTED_ANY} */ (config)
94 );
95 applyWebpackOptionsDefaults(/** @type {EXPECTED_ANY} */ (normalized));
96 process.chdir(cwd);
97 return /** @type {WebpackOptionsNormalized} */ (normalized);
98};
99
100describe("snapshots", () => {
101 const baseConfig = getDefaultConfig({ mode: "none" });

Callers 2

testFunction · 0.85

Calls 3

requireFunction · 0.70

Tested by 1

testFunction · 0.68