diff --git a/src/webpack/getDevConfig.ts b/src/webpack/getDevConfig.ts index d61902953c8..6f0a00f3082 100644 --- a/src/webpack/getDevConfig.ts +++ b/src/webpack/getDevConfig.ts @@ -47,7 +47,7 @@ export default (payloadConfig: Config): Configuration => { }); if (payloadConfig.admin.webpack && typeof payloadConfig.admin.webpack === 'function') { - config = payloadConfig.webpack(config); + config = payloadConfig.admin.webpack(config); } return config; diff --git a/src/webpack/getProdConfig.ts b/src/webpack/getProdConfig.ts index bdcc31c90ca..dc132d3ed71 100644 --- a/src/webpack/getProdConfig.ts +++ b/src/webpack/getProdConfig.ts @@ -66,7 +66,7 @@ export default (payloadConfig: Config): Configuration => { } if (payloadConfig.admin.webpack && typeof payloadConfig.admin.webpack === 'function') { - config = payloadConfig.webpack(config); + config = payloadConfig.admin.webpack(config); } return config;