diff --git a/app/react/src/server/config.js b/app/react/src/server/config.js index 36e2d30ec259..21d476051f4a 100644 --- a/app/react/src/server/config.js +++ b/app/react/src/server/config.js @@ -73,7 +73,10 @@ export default function(configType, baseConfig, configDir) { ...config.module, // We need to use our and custom rules. ...customConfig.module, - rules: [...config.module.rules, ...(customConfig.module.rules || [])], + rules: [ + ...config.module.rules, + ...((customConfig.module && customConfig.module.rules) || []), + ], }, resolve: { ...config.resolve,