import MainView from 'views/MainView'
import SyncView from 'views/SyncView'
{{#if_eq routerVersion "v4"~}}
import Loadable from 'react-loadable'
{{/if_eq}}

export default [
  {
    path: '/',
    component: MainView,
    childRoutes: [
      {
        path: '/sync',
        component: SyncView
      },
      {
        path: '/async',
        {{#if_eq routerVersion "v3"}}
        getComponent (nextState, cb) {
          (async () => {
            const view = await import('views/AsyncView')
            cb(null, view.default)
          })()
        }
        {{/if_eq}}
        {{#if_eq routerVersion "v4"}}
        component: Loadable({
          loader: () => import(`views/AsyncView`),
          // if you have your own loading component,
          // you should consider add it here
          LoadingComponent: () => null
        })
        {{/if_eq}}
      }
    ]
  }
]

@@ -1,881 +1,24 @@
-import MainView from 'views/MainView'%0Aimport SyncView from 'views/SyncView'%0A%7B%7B#if_eq routerVersion %22v4%22~%7D%7D%0Aimport Loadable from 'react-loadable'%0A%7B%7B/if_eq%7D%7D%0A%0Aexport default %5B%0A  %7B%0A    path: '/',%0A    component: MainView,%0A    childRoutes: %5B%0A      %7B%0A        path: '/sync',%0A        component: SyncView%0A      %7D,%0A      %7B%0A        path: '/async',%0A        %7B%7B#if_eq routerVersion %22v3%22%7D%7D%0A        getComponent (nextState, cb) %7B%0A          (async () =%3E %7B%0A            const view = await import('views/AsyncView')%0A            cb(null, view.default)%0A          %7D)()%0A        %7D%0A        %7B%7B/if_eq%7D%7D%0A        %7B%7B#if_eq routerVersion %22v4%22%7D%7D%0A        component: Loadable(%7B%0A          loader: () =%3E import(%60views/AsyncView%60),%0A          // if you have your own loading component,%0A          // you should consider add it here%0A          LoadingComponent: () =%3E null%0A        %7D)%0A        %7B%7B/if_eq%7D%7D%0A      %7D%0A    %5D%0A  %7D
+%0A%0Aexport default  %5B  
 %0A%5D%0A

Update index.js