ing
This commit is contained in:
parent
6f7f35317f
commit
90fb76955e
|
@ -19,6 +19,11 @@ import {
|
||||||
routerMiddleware,
|
routerMiddleware,
|
||||||
} from 'react-router-redux';
|
} from 'react-router-redux';
|
||||||
|
|
||||||
|
import {
|
||||||
|
createHashHistory,
|
||||||
|
History,
|
||||||
|
} from 'history';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AppContainer,
|
AppContainer,
|
||||||
} from 'react-hot-loader';
|
} from 'react-hot-loader';
|
||||||
|
@ -41,11 +46,13 @@ class WebAppApplication {
|
||||||
|
|
||||||
public constructor() {
|
public constructor() {
|
||||||
this.container = document.getElementById('appContainer');
|
this.container = document.getElementById('appContainer');
|
||||||
|
this.history = createHashHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async run(): Promise<void> {
|
public async run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
this.renderLoading();
|
this.renderLoading();
|
||||||
|
this.renderApp();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
@ -100,7 +107,7 @@ class WebAppApplication {
|
||||||
private rederDevelopment(): void {
|
private rederDevelopment(): void {
|
||||||
if (module.hot) {
|
if (module.hot) {
|
||||||
module.hot.accept('./pages/webapp', async () => {
|
module.hot.accept('./pages/webapp', async () => {
|
||||||
const NextApp = (await import('./pages/webapp')).default;
|
const NextApp = (await require('./pages/webapp')).default;
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<AppContainer>
|
<AppContainer>
|
||||||
<Provider store={this.store}>
|
<Provider store={this.store}>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user