strapi/packages/core/admin/strapi-server.js
2021-08-02 17:54:49 +02:00

18 lines
420 B
JavaScript

'use strict';
const _ = require('lodash');
const admin = require('./server');
const mergeRoutes = (a, b, key) => {
return _.isArray(a) && _.isArray(b) && key === 'routes' ? a.concat(b) : undefined;
};
if (process.env.STRAPI_DISABLE_EE !== 'true' && strapi.EE) {
const eeAdmin = require('./ee/strapi-server');
module.exports = _.mergeWith({}, admin, eeAdmin, mergeRoutes);
} else {
module.exports = admin;
}