diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects-admin/routes.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projects-admin/routes.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects-admin/routes.js b/server/sonar-web/src/main/js/apps/projects-admin/routes.js index 6ca2206f863..d17958371b6 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/routes.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/routes.js @@ -20,12 +20,12 @@ const routes = [ { getIndexRoute(_, callback) { - require.ensure([], require => { - const AppContainer = require('./AppContainer').default; - const forSingleOrganization = require('../organizations/forSingleOrganization').default; - const component = forSingleOrganization(AppContainer); - callback(null, { component }); - }); + Promise.all([ + import('./AppContainer').then(i => i.default), + import('../organizations/forSingleOrganization').then(i => i.default) + ]).then(([AppContainer, forSingleOrganization]) => + callback(null, { component: forSingleOrganization(AppContainer) }) + ); } } ]; |