This commit is contained in:
crusader 2017-12-18 20:10:20 +09:00
parent 6f7f35317f
commit 90fb76955e

View File

@ -19,6 +19,11 @@ import {
routerMiddleware,
} from 'react-router-redux';
import {
createHashHistory,
History,
} from 'history';
import {
AppContainer,
} from 'react-hot-loader';
@ -41,11 +46,13 @@ class WebAppApplication {
public constructor() {
this.container = document.getElementById('appContainer');
this.history = createHashHistory();
}
public async run(): Promise<void> {
try {
this.renderLoading();
this.renderApp();
} catch (e) {
console.error(e);
}
@ -100,7 +107,7 @@ class WebAppApplication {
private rederDevelopment(): void {
if (module.hot) {
module.hot.accept('./pages/webapp', async () => {
const NextApp = (await import('./pages/webapp')).default;
const NextApp = (await require('./pages/webapp')).default;
ReactDOM.render(
<AppContainer>
<Provider store={this.store}>