MCPcopy
hub / github.com/webpack/webpack / processOptions

Function processOptions

test/Examples.test.js:139–162  ·  view source on GitHub ↗

* @param {import("../").Configuration} options options

(options)

Source from the content-addressed store, hash-verified

137 * @param {import("../").Configuration} options options
138 */
139 function processOptions(options) {
140 options.context = examplePath;
141 options.output = options.output || {};
142 options.output.pathinfo = true;
143 options.output.path = path.join(examplePath, "dist");
144 options.output.publicPath = "dist/";
145 if (!options.entry) options.entry = "./example.js";
146 if (!options.plugins) options.plugins = [];
147 // Only filesystem-cache examples have a persistent store that can
148 // fail; capture infra logs so a store/restore failure (emitted
149 // during the idle store on close) fails the build.
150 if (
151 options.cache &&
152 typeof options.cache === "object" &&
153 options.cache.type === "filesystem"
154 ) {
155 usesFilesystemCache = true;
156 options.infrastructureLogging = {
157 ...options.infrastructureLogging,
158 debug: true,
159 console: createLogger(infraStructureErrors)
160 };
161 }
162 }
163
164 const webpack = require("..");
165

Callers 1

Examples.test.jsFile · 0.85

Calls 1

createLoggerFunction · 0.70

Tested by

no test coverage detected