Skip to content

Commit

Permalink
Use webpack-hot-middleware api instead of query string
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzzy committed Oct 4, 2017
1 parent 802173c commit 7f22ebd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 22 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"express": "^4.16.1",
"express-graphql": "^0.6.11",
"express-jwt": "^5.3.0",
"graphql": "^0.11.6",
"graphql": "^0.11.7",
"history": "^4.7.2",
"isomorphic-style-loader": "^4.0.0",
"jsonwebtoken": "^8.0.1",
Expand All @@ -30,9 +30,9 @@
"query-string": "^5.0.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"sequelize": "^4.13.2",
"sequelize": "^4.13.3",
"serialize-javascript": "^1.3.0",
"source-map-support": "^0.4.18",
"source-map-support": "^0.5.0",
"sqlite3": "^3.1.8",
"universal-router": "^4.2.0",
"whatwg-fetch": "^2.0.3"
Expand All @@ -55,7 +55,7 @@
"browser-sync": "^2.18.13",
"chokidar": "^1.7.0",
"css-loader": "^0.28.7",
"enzyme": "^3.0.0",
"enzyme": "^3.1.0",
"eslint": "^4.8.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.6.0",
Expand Down Expand Up @@ -96,7 +96,7 @@
"postcss-pseudoelements": "^5.0.0",
"postcss-selector-matches": "^3.0.1",
"postcss-selector-not": "^3.0.1",
"prettier": "^1.7.3",
"prettier": "^1.7.4",
"raw-loader": "^0.5.1",
"react-deep-force-update": "^2.1.1",
"react-dev-utils": "^4.1.0",
Expand Down
8 changes: 6 additions & 2 deletions tools/lib/webpackHotDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
* LICENSE.txt file in the root directory of this source tree.
*/

// eslint-disable-next-line import/no-unresolved, import/extensions
import hotClient from 'webpack-hot-middleware/client?name=client&reload=true';
import hotClient from 'webpack-hot-middleware/client';
import launchEditorEndpoint from 'react-dev-utils/launchEditorEndpoint';
import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages';
import {
Expand All @@ -32,6 +31,11 @@ hotClient.useCustomOverlay({
},
});

hotClient.setOptionsAndConnect({
name: 'client',
reload: true,
});

startReportingRuntimeErrors({
launchEditorEndpoint,
filename: '/assets/client.js',
Expand Down
40 changes: 25 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3165,9 +3165,9 @@ entities@^1.1.1, entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"

enzyme@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.0.0.tgz#94ce364254dc654c4e619b25eecc644bf6481de7"
enzyme@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.1.0.tgz#d8ca84085790fbcec6ed40badd14478faee4c25a"
dependencies:
cheerio "^1.0.0-rc.2"
function.prototype.name "^1.0.3"
Expand All @@ -3178,7 +3178,7 @@ enzyme@^3.0.0:
object.entries "^1.0.4"
object.values "^1.0.4"
raf "^3.3.2"
rst-selector-parser "^2.2.1"
rst-selector-parser "^2.2.2"

errno@^0.1.3, errno@^0.1.4:
version "0.1.4"
Expand Down Expand Up @@ -4160,9 +4160,9 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"

graphql@^0.11.6:
version "0.11.6"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.11.6.tgz#f0146b5dc1480fda579c21bb6238970fd5cf5aa3"
graphql@^0.11.7:
version "0.11.7"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.11.7.tgz#e5abaa9cb7b7cccb84e9f0836bf4370d268750c6"
dependencies:
iterall "1.1.3"

Expand Down Expand Up @@ -7052,9 +7052,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.3.tgz#8e6974725273914b1c47439959dd3d3ba53664b6"
prettier@^1.7.4:
version "1.7.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa"

pretty-error@^2.1.1:
version "2.1.1"
Expand Down Expand Up @@ -7756,7 +7756,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^2.0.0"
inherits "^2.0.1"

rst-selector-parser@^2.2.1:
rst-selector-parser@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.2.tgz#9927b619bd5af8dc23a76c64caef04edf90d2c65"
dependencies:
Expand Down Expand Up @@ -7879,9 +7879,9 @@ [email protected]:
range-parser "~1.2.0"
statuses "~1.3.1"

sequelize@^4.13.2:
version "4.13.2"
resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-4.13.2.tgz#1af6ca554cfcb2c1112d36377976001dd0d983a9"
sequelize@^4.13.3:
version "4.13.3"
resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-4.13.3.tgz#4538ef68fee1f9e176f0a3819204c49c4f3b2293"
dependencies:
bluebird "^3.4.6"
cls-bluebird "^2.0.1"
Expand Down Expand Up @@ -8116,12 +8116,18 @@ source-map-support@^0.4.15:
dependencies:
source-map "^0.5.6"

source-map-support@^0.4.18, source-map-support@^0.4.2:
source-map-support@^0.4.2:
version "0.4.18"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
dependencies:
source-map "^0.5.6"

source-map-support@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.0.tgz#2018a7ad2bdf8faf2691e5fddab26bed5a2bacab"
dependencies:
source-map "^0.6.0"

[email protected]:
version "0.1.32"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266"
Expand All @@ -8142,6 +8148,10 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, sour
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"

source-map@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"

source-map@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
Expand Down

0 comments on commit 7f22ebd

Please sign in to comment.