代码
import React from "react";
import AsyncYX from "./pages/YX"
import AsyncXCXYX from "./pages/XCXYX"
// import AsyncTV from "./pages/TV"
import AsyncAMTV from "./pages/AMTV"
import AsyncYXYL from "./pages/YXYl"
import AsyncJPTV from "./pages/JPTV"
import AsyncAMQD from "./pages/AMQD"
import AsyncCOUPON from "./pages/COUPON"
import AsyncQD from "./pages/QD"
import AsyncAMobile from "./pages/AMobile"
//loading
import Loading from "./components/Loading"
import {
BrowserRouter as Router,
Route,
} from "react-router-dom";
import Loadable from 'react-loadable';
const AsyncTV = Loadable({
loading: Loading,
loader: () => import('./pages/TV'),
})
// 路由配置
class App extends React.Component {
render() {
return (
<Router>
<div>
<Route
exact
path="/youxi"
render={({match}) => <AsyncYX/>}
/>
<Route
exact
path="/yulan"
render={({match}) => <AsyncYXYL/>}
/>
<Route
exact
path="/tv.html"
render={({match}) => <AsyncTV/>}/>
<Route
exact
path="/amtv"
render={({match}) => <AsyncAMTV/>}/>
<Route
exact
path="/jptv.html"
render={({match}) => <AsyncJPTV/>}/>
<Route
exact
path="/aimaqd"
render={({match}) => <AsyncAMQD/>}/>
<Route
exact
path="/xcxyouxi"
render={({match}) => <AsyncXCXYX/>}/>
<Route
exact
path="/coupon"
render={({match}) => <AsyncCOUPON/>}/>
<Route
exact
path="/qd"
render={({match}) => <AsyncQD/>}/>
<Route
exact
path="/mobile"
render={({match}) => <AsyncAMobile/>}/>
</div>
</Router>
);
}
}
export default App;
报错 如下图
WechatIMG125.jpeg
想问一下 有没有遇到类似的