Skip to content

Commit 35283df

Browse files
holaontiverosarbrandes
authored andcommitted
feat: added code spliting on main module
1 parent 852444a commit 35283df

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/routes.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import Main from './Main';
2-
31
const routes = [
42
{
53
id: 'org.openedx.frontend.route.learnerDashboard.main',
64
path: '/',
75
handle: {
86
role: 'org.openedx.frontend.role.dashboard'
97
},
10-
Component: Main
8+
async lazy () {
9+
const module = await import('./Main');
10+
return { Component: module.default };
11+
},
1112
}
1213
];
1314

0 commit comments

Comments
 (0)