Skip to content

Commit

Permalink
Fix On Demand Types in Hot Reloader (#11987)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer authored Apr 17, 2020
1 parent fe686b3 commit bc12794
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/next/server/hot-reloader.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { NextHandleFunction } from 'connect'
import { IncomingMessage, ServerResponse } from 'http'
import WebpackDevMiddleware from 'next/dist/compiled/webpack-dev-middleware'
import WebpackHotMiddleware from 'next/dist/compiled/webpack-hot-middleware'
import { join, normalize, relative as relativePath, sep } from 'path'
import { UrlObject } from 'url'
import webpack from 'webpack'
import WebpackDevMiddleware from 'next/dist/compiled/webpack-dev-middleware'
import WebpackHotMiddleware from 'next/dist/compiled/webpack-hot-middleware'
import { createEntrypoints, createPagesMapping } from '../build/entries'
import { watchCompilers } from '../build/output'
import getBaseWebpackConfig from '../build/webpack-config'
Expand Down Expand Up @@ -484,15 +484,14 @@ export default class HotReloader {
webpackDevMiddleware,
multiCompiler,
{
dir: this.dir,
buildId: this.buildId,
pagesDir: this.pagesDir,
distDir: this.config.distDir,
reload: this.reload.bind(this),
pageExtensions: this.config.pageExtensions,
publicRuntimeConfig: this.config.publicRuntimeConfig,
serverRuntimeConfig: this.config.serverRuntimeConfig,
...this.config.onDemandEntries,
...(this.config.onDemandEntries as {
maxInactiveAge: number
pagesBufferLength: number
}),
}
)

Expand Down

0 comments on commit bc12794

Please sign in to comment.