This commit is contained in:
crusader 2017-12-21 00:15:00 +09:00
parent 6b9ff2db2d
commit 59415bd7ac
2 changed files with 17 additions and 16 deletions

View File

@ -30,7 +30,7 @@ import {
import config from './config';
import WebAppReducer from '@overflow/webapp/redux/webapp_reducer';
import WebApp from './pages/webapp';
// declare let module: { hot: any };
declare global {
@ -114,8 +114,8 @@ class WebAppApplication {
private rederDevelopment(): void {
if (module.hot) {
module.hot.accept('./pages/webapp', async () => {
const NextApp = (await import('./pages/webapp')).default;
module.hot.accept('./pages/webapp', () => {
const NextApp = require('./pages/webapp').default;
ReactDOM.render(
<AppContainer>
<Provider store={this.store}>
@ -128,20 +128,21 @@ class WebAppApplication {
this.container,
);
});
} else {
ReactDOM.render(
<AppContainer>
<Provider store={this.store}>
<ConnectedRouter history={this.history}>
</ConnectedRouter>
</Provider>
</AppContainer>
,
this.container,
);
}
ReactDOM.render(
<AppContainer>
<Provider store={this.store}>
<ConnectedRouter history={this.history}>
<WebApp/>
</ConnectedRouter>
</Provider>
</AppContainer>
,
this.container,
);
}

View File

@ -14,7 +14,7 @@ class WebApp extends React.Component<Props, State> {
public render(): JSX.Element {
return (
<b>Hello</b>
<b>Hello...</b>
);
}
}