index.js 476 Bytes
import React from 'react';
import { Route, Switch } from "react-router";
import asyncComponent from '../AsyncComponent';

//首页
const HomeContainer = asyncComponent(
    () => import(/* webpackChunkName: "home" */'../../containers/home')
);

const homeRoute = (match) => {
    return (
        <Switch>
            {/* 首页 */}
            <Route exact={true} path={`${match.path}/home`} component={HomeContainer} />
        </Switch>
    );
};

export default homeRoute;