|
1 | 1 | const appConfig = require("../config/main"); |
2 | 2 |
|
3 | 3 | import * as e6p from "es6-promise"; |
4 | | -(e6p as any).polyfill(); |
5 | 4 | import "isomorphic-fetch"; |
6 | 5 |
|
7 | 6 | import * as React from "react"; |
8 | 7 | import * as ReactDOMServer from "react-dom/server"; |
9 | 8 |
|
10 | | -import { Provider } from "react-redux"; |
11 | | -import { createMemoryHistory, match } from "react-router"; |
12 | | -import { syncHistoryWithStore } from "react-router-redux"; |
13 | | -const { ReduxAsyncConnect, loadOnServer } = require("redux-connect"); |
14 | | -import { configureStore } from "./app/redux/configureStore"; |
| 9 | +import {Provider} from "react-redux"; |
| 10 | +import {createMemoryHistory, match} from "react-router"; |
| 11 | +import {syncHistoryWithStore} from "react-router-redux"; |
| 12 | +import {configureStore} from "./app/redux/configureStore"; |
15 | 13 | import routes from "./app/routes/routes"; |
16 | 14 |
|
17 | | -import { Html } from "./app/containers"; |
| 15 | +import {Html} from "./app/containers"; |
| 16 | +(e6p as any).polyfill(); |
| 17 | +const { ReduxAsyncConnect, loadOnServer } = require("redux-connect"); |
18 | 18 | const manifest = require("../build/manifest.json"); |
19 | 19 |
|
20 | 20 | const express = require("express"); |
@@ -74,7 +74,11 @@ app.get("*", (req, res) => { |
74 | 74 | if (appConfig.ssr) { |
75 | 75 | res.status(200).send(renderHTML(markup, store)); |
76 | 76 | }else { |
77 | | - res.sendFile(path.resolve("./build/index.html"), (err) => {console.error(err); }); |
| 77 | + res.sendFile(path.resolve("./build/index.html"), (err) => { |
| 78 | + if (err) { |
| 79 | + console.error(err); |
| 80 | + } |
| 81 | + }); |
78 | 82 | } |
79 | 83 | }); |
80 | 84 | } else { |
|
0 commit comments