From 3b4d82384598ca7b2150d11f861efef9dfae8512 Mon Sep 17 00:00:00 2001 From: Thomas Klein Date: Sat, 12 Oct 2019 11:41:54 +0200 Subject: [PATCH] build: added typings for hot reload (#187) --- package.json | 3 ++- src/index.tsx | 2 -- yarn.lock | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 605286e..b5b9636 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@types/react-dom": "16.9.0", "@types/react-router-dom": "5.1.0", "@types/validator": "10.11.3", + "@types/webpack-env": "1.14.0", "@typescript-eslint/parser": "2.3.2", "@verdaccio/babel-preset": "2.0.0", "@verdaccio/eslint-config": "2.0.0", @@ -85,9 +86,9 @@ "react": "16.10.0", "react-autosuggest": "9.4.3", "react-dom": "16.10.0", - "react-router-dom": "5.1.2", "react-emotion": "9.2.12", "react-hot-loader": "4.12.11", + "react-router-dom": "5.1.2", "resolve-url-loader": "3.1.0", "rimraf": "3.0.0", "source-map-loader": "0.2.4", diff --git a/src/index.tsx b/src/index.tsx index 50ffa39..6e6a0bf 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -19,9 +19,7 @@ const renderApp = (Component: React.ElementType): void => { renderApp(App); -// @ts-ignore if (module.hot) { - // @ts-ignore module.hot.accept('./App', () => { renderApp(App); }); diff --git a/yarn.lock b/yarn.lock index 3b14c1f..534e100 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1768,6 +1768,11 @@ "@types/unist" "*" "@types/vfile-message" "*" +"@types/webpack-env@1.14.0": + version "1.14.0" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.14.0.tgz#8edfc5f8e6eae20eeed3ca0d02974ed4ee5e4efc" + integrity sha512-Fv+0gYJzE/czLoRKq+gnXWr4yBpPM3tO3C8pDLFwqVKlMICQUq5OsxwwFZYDaVr7+L6mgNDp16iOcJHEz3J5RQ== + "@types/yargs-parser@*": version "13.1.0" resolved "https://registry.verdaccio.org/@types%2fyargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228"