Yoshie Muranaka | 3dd167a | 2020-09-03 13:58:35 -0700 | [diff] [blame] | 1 | import { remove } from 'lodash'; |
Yoshie Muranaka | 816d947 | 2020-09-03 11:19:28 -0700 | [diff] [blame] | 2 | import routes from '@/router/routes'; |
Yoshie Muranaka | 9e36f52 | 2020-02-05 07:42:34 -0800 | [diff] [blame] | 3 | |
Yoshie Muranaka | 3dd167a | 2020-09-03 13:58:35 -0700 | [diff] [blame] | 4 | const customRoutes = routes.map(route => { |
| 5 | // Removes router definition that includes kvm |
| 6 | // in name property (main and console layouts) |
| 7 | |
| 8 | // TODO: will revisit this, removing the definition |
| 9 | // removes the route from the application but |
| 10 | // the component is still included in the final build |
| 11 | remove(route.children, ({ name }) => name.includes('kvm')); |
| 12 | return route; |
| 13 | }); |
| 14 | |
| 15 | export default customRoutes; |