diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules/routes.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/coding-rules/routes.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/routes.js b/server/sonar-web/src/main/js/apps/coding-rules/routes.js index 651cc6aeaec..a1bba34c6b6 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/routes.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/routes.js @@ -17,8 +17,16 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; -import { IndexRoute } from 'react-router'; -import CodingRulesAppContainer from './components/CodingRulesAppContainer'; +const routes = [ + { + indexRoute: { + getComponent(_, callback) { + require.ensure([], require => { + callback(null, require('./components/CodingRulesAppContainer').default); + }); + } + } + } +]; -export default <IndexRoute component={CodingRulesAppContainer} />; +export default routes; |