MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / resolveConfig

Function resolveConfig

packages/webpack5/src/index.ts:221–244  ·  view source on GitHub ↗
(
	chainableConfig = resolveChainableConfig(),
)

Source from the content-addressed store, hash-verified

219 * @param chainableConfig Optional chain config to use.
220 */
221export function resolveConfig(
222 chainableConfig = resolveChainableConfig(),
223): webpack.Configuration {
224 if (!hasInitialized) {
225 throw error('resolveConfig() must be called after init()');
226 }
227
228 let config = chainableConfig.toConfig();
229
230 // this applies webpack merges
231 webpackMerges.forEach((mergeFn) => {
232 if (typeof mergeFn === 'function') {
233 // mergeFn is a function with optional return value
234 const res = mergeFn(config, env);
235 if (res) config = merge(config, res);
236 } else if (mergeFn) {
237 // mergeFn is a literal value (object)
238 config = merge(config, mergeFn);
239 }
240 });
241
242 // return a config usable by webpack
243 return config;
244}

Callers

nothing calls this directly

Calls 4

errorFunction · 0.90
resolveChainableConfigFunction · 0.85
forEachMethod · 0.80
mergeFunction · 0.50

Tested by

no test coverage detected