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 { 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'
......@@ -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
}),
}
)
......
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