MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / mergeConfig

Function mergeConfig

apps/debug/next.config.mjs:25–43  ·  view source on GitHub ↗
(nextConfig, userConfig)

Source from the content-addressed store, hash-verified

23mergeConfig(nextConfig, userConfig)
24
25function mergeConfig(nextConfig, userConfig) {
26 if (!userConfig) {
27 return
28 }
29
30 for (const key in userConfig) {
31 if (
32 typeof nextConfig[key] === 'object' &&
33 !Array.isArray(nextConfig[key])
34 ) {
35 nextConfig[key] = {
36 ...nextConfig[key],
37 ...userConfig[key],
38 }
39 } else {
40 nextConfig[key] = userConfig[key]
41 }
42 }
43}
44
45export default nextConfig

Callers 1

next.config.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected