1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/packages/next/client
JJ Kasper af07611a63 Implement websockets based on-demand-entries ping (#4508)
Fixes #4495

Here's my approach for replacing the XHR on-demand-entries pinger #1364 #4495. I'm not sure if this is the way everyone wants to accomplish this since I saw mention of using a separate server and port for the dynamic entries websocket, but thought this would be a fairly clean solution since it doesn't need that.

With this method the only change when using a custom server is you have to listen for the upgrade event and pass it to next.getRequestHandler(). Example: 
```
const server = app.listen(port)
const handleRequest = next.getRequestHandler()

if(dev) {
  server.on('upgrade', handleRequest)
}
```
2018-12-14 12:25:59 +01:00
..
dev-error-overlay Monorepo (#5341) 2018-10-01 01:02:10 +02:00
error-boundary.js Remove flow types (#5704) 2018-11-21 16:04:37 +01:00
head-manager.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
index.js Use Typescript to transpile Next.js core files instead of Babel (#5747) 2018-11-28 15:03:02 +01:00
link.js Use Typescript to transpile Next.js core files instead of Babel (#5747) 2018-11-28 15:03:02 +01:00
next-dev.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
next.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
noop.js Monorepo (#5341) 2018-10-01 01:02:10 +02:00
on-demand-entries-client.js Implement websockets based on-demand-entries ping (#4508) 2018-12-14 12:25:59 +01:00
page-loader.js Don’t prefetch on slow network / when datasaver is enabled (#5876) 2018-12-13 19:08:23 +01:00
router.js Make sure const/async is transpiled (#5760) 2018-11-28 17:53:49 +01:00
source-map-support.js Remove flow types (#5704) 2018-11-21 16:04:37 +01:00
webpack-hot-middleware-client.js Use Typescript to transpile Next.js core files instead of Babel (#5747) 2018-11-28 15:03:02 +01:00
with-router.js Make sure const/async is transpiled (#5760) 2018-11-28 17:53:49 +01:00