From c9a450d8876ef65cf47c910665392405604aa6bf Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 28 Jul 2017 19:00:07 +0900 Subject: [PATCH] ing --- config/webpack/webpack.config.base.js | 1 - config/webpack/webpack.config.dev.js | 1 + src/ts/@overflow/app/index.tsx | 27 ++++++++++++++++----------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/config/webpack/webpack.config.base.js b/config/webpack/webpack.config.base.js index 3155c2a..34cae75 100644 --- a/config/webpack/webpack.config.base.js +++ b/config/webpack/webpack.config.base.js @@ -6,7 +6,6 @@ module.exports = { target: 'web', entry: { app: [ - 'react-hot-loader/patch', Path.resolve(__dirname, '../../src/ts/@overflow/app/index.tsx') ], vendor: Object.keys(packages.dependencies) diff --git a/config/webpack/webpack.config.dev.js b/config/webpack/webpack.config.dev.js index de2ccca..fad9808 100644 --- a/config/webpack/webpack.config.dev.js +++ b/config/webpack/webpack.config.dev.js @@ -8,6 +8,7 @@ const configBase = require('./webpack.config.base.js'); module.exports = WebpackMerge(configBase, { entry: { app: [ + 'react-hot-loader/patch' ] }, diff --git a/src/ts/@overflow/app/index.tsx b/src/ts/@overflow/app/index.tsx index a4b0458..4958841 100644 --- a/src/ts/@overflow/app/index.tsx +++ b/src/ts/@overflow/app/index.tsx @@ -52,10 +52,15 @@ import appConfig, { Config, ReduxState } from './config'; import App from './views/App'; -injectTapEventPlugin(); +declare global { + interface Window { + devToolsExtension: () => any; + } + const process: any; + const module: any; +} -// const isProduction:boolean = process.env.NODE_ENV === 'production' ? true : false; -// const useReduxDevTools = window.devToolsExtension && !isProduction ? true : false; +injectTapEventPlugin(); class Application { private static isProduction:boolean = process.env.NODE_ENV === 'production' ? true : false; @@ -112,13 +117,13 @@ class Application { private initRpcClient(): Promise { const rpcClient = new Promise((resolve, reject) => { let client = new WebSocketRPC(this.config.rpc.url); - client.initialize() - .then(() => { - resolve(client); - }) - .catch((err: any) => { - reject(err); - }); + // client.initialize() + // .then(() => { + // resolve(client); + // }) + // .catch((err: any) => { + // reject(err); + // }); resolve(client); }); @@ -171,7 +176,7 @@ class Application { alignItems: 'center', justifyContent: 'center', }}> -

Loading...

+

Loading......

, this.container, );