Unverified Commit bc127946 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Fix On Demand Types in Hot Reloader (#11987)

parent fe686b30
import { NextHandleFunction } from 'connect' import { NextHandleFunction } from 'connect'
import { IncomingMessage, ServerResponse } from 'http' 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 { join, normalize, relative as relativePath, sep } from 'path'
import { UrlObject } from 'url' import { UrlObject } from 'url'
import webpack from 'webpack' 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 { createEntrypoints, createPagesMapping } from '../build/entries'
import { watchCompilers } from '../build/output' import { watchCompilers } from '../build/output'
import getBaseWebpackConfig from '../build/webpack-config' import getBaseWebpackConfig from '../build/webpack-config'
...@@ -484,15 +484,14 @@ export default class HotReloader { ...@@ -484,15 +484,14 @@ export default class HotReloader {
webpackDevMiddleware, webpackDevMiddleware,
multiCompiler, multiCompiler,
{ {
dir: this.dir,
buildId: this.buildId, buildId: this.buildId,
pagesDir: this.pagesDir, pagesDir: this.pagesDir,
distDir: this.config.distDir,
reload: this.reload.bind(this), reload: this.reload.bind(this),
pageExtensions: this.config.pageExtensions, pageExtensions: this.config.pageExtensions,
publicRuntimeConfig: this.config.publicRuntimeConfig, ...(this.config.onDemandEntries as {
serverRuntimeConfig: this.config.serverRuntimeConfig, maxInactiveAge: number
...this.config.onDemandEntries, pagesBufferLength: number
}),
} }
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment