Unverified Commit 4ebeace3 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Rename currentIssues to currentEntryIssues (#62524)

## What?

Renaming this as a follow-up PR is going to introduce top-level errors.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-2589
parent 222a773d
...@@ -170,7 +170,7 @@ import { isInterceptionRouteAppPath } from '../server/future/helpers/interceptio ...@@ -170,7 +170,7 @@ import { isInterceptionRouteAppPath } from '../server/future/helpers/interceptio
import { import {
getTurbopackJsConfig, getTurbopackJsConfig,
handleEntrypoints, handleEntrypoints,
type IssuesMap, type EntryIssuesMap,
handleRouteType, handleRouteType,
handlePagesErrorRoute, handlePagesErrorRoute,
formatIssue, formatIssue,
...@@ -1390,7 +1390,7 @@ export default async function build( ...@@ -1390,7 +1390,7 @@ export default async function build(
page: new Map(), page: new Map(),
} }
const currentIssues: IssuesMap = new Map() const currentEntryIssues: EntryIssuesMap = new Map()
const manifestLoader = new TurbopackManifestLoader({ buildId, distDir }) const manifestLoader = new TurbopackManifestLoader({ buildId, distDir })
...@@ -1412,7 +1412,7 @@ export default async function build( ...@@ -1412,7 +1412,7 @@ export default async function build(
await handleEntrypoints({ await handleEntrypoints({
entrypoints, entrypoints,
currentEntrypoints, currentEntrypoints,
currentIssues, currentEntryIssues,
manifestLoader, manifestLoader,
nextConfig: config, nextConfig: config,
rewrites: emptyRewritesObjToBeImplemented, rewrites: emptyRewritesObjToBeImplemented,
...@@ -1446,7 +1446,7 @@ export default async function build( ...@@ -1446,7 +1446,7 @@ export default async function build(
pathname: page, pathname: page,
route, route,
currentIssues, currentEntryIssues,
entrypoints: currentEntrypoints, entrypoints: currentEntrypoints,
manifestLoader, manifestLoader,
rewrites: emptyRewritesObjToBeImplemented, rewrites: emptyRewritesObjToBeImplemented,
...@@ -1461,7 +1461,7 @@ export default async function build( ...@@ -1461,7 +1461,7 @@ export default async function build(
dev: false, dev: false,
pathname: normalizeAppPath(page), pathname: normalizeAppPath(page),
route, route,
currentIssues, currentEntryIssues,
entrypoints: currentEntrypoints, entrypoints: currentEntrypoints,
manifestLoader, manifestLoader,
rewrites: emptyRewritesObjToBeImplemented, rewrites: emptyRewritesObjToBeImplemented,
...@@ -1471,7 +1471,7 @@ export default async function build( ...@@ -1471,7 +1471,7 @@ export default async function build(
enqueue(() => enqueue(() =>
handlePagesErrorRoute({ handlePagesErrorRoute({
currentIssues, currentEntryIssues,
entrypoints: currentEntrypoints, entrypoints: currentEntrypoints,
manifestLoader, manifestLoader,
rewrites: emptyRewritesObjToBeImplemented, rewrites: emptyRewritesObjToBeImplemented,
...@@ -1488,8 +1488,8 @@ export default async function build( ...@@ -1488,8 +1488,8 @@ export default async function build(
page: string page: string
message: string message: string
}[] = [] }[] = []
for (const [page, pageIssues] of currentIssues) { for (const [page, entryIssues] of currentEntryIssues) {
for (const issue of pageIssues.values()) { for (const issue of entryIssues.values()) {
errors.push({ errors.push({
page, page,
message: formatIssue(issue), message: formatIssue(issue),
......
...@@ -44,7 +44,7 @@ import { trace } from '../../trace' ...@@ -44,7 +44,7 @@ import { trace } from '../../trace'
import type { VersionInfo } from './parse-version-info' import type { VersionInfo } from './parse-version-info'
import { import {
type ChangeSubscriptions, type ChangeSubscriptions,
type IssuesMap, type EntryIssuesMap,
formatIssue, formatIssue,
getTurbopackJsConfig, getTurbopackJsConfig,
handleEntrypoints, handleEntrypoints,
...@@ -151,7 +151,7 @@ export async function createHotReloaderTurbopack( ...@@ -151,7 +151,7 @@ export async function createHotReloaderTurbopack(
app: new Map(), app: new Map(),
} }
const currentIssues: IssuesMap = new Map() const currentEntryIssues: EntryIssuesMap = new Map()
const manifestLoader = new TurbopackManifestLoader({ buildId, distDir }) const manifestLoader = new TurbopackManifestLoader({ buildId, distDir })
...@@ -253,7 +253,7 @@ export async function createHotReloaderTurbopack( ...@@ -253,7 +253,7 @@ export async function createHotReloaderTurbopack(
let hmrEventHappened = false let hmrEventHappened = false
let hmrHash = 0 let hmrHash = 0
const sendEnqueuedMessages = () => { const sendEnqueuedMessages = () => {
for (const [, issueMap] of currentIssues) { for (const [, issueMap] of currentEntryIssues) {
if (issueMap.size > 0) { if (issueMap.size > 0) {
// During compilation errors we want to delay the HMR events until errors are fixed // During compilation errors we want to delay the HMR events until errors are fixed
return return
...@@ -307,7 +307,7 @@ export async function createHotReloaderTurbopack( ...@@ -307,7 +307,7 @@ export async function createHotReloaderTurbopack(
} }
type ClientState = { type ClientState = {
clientIssues: IssuesMap clientIssues: EntryIssuesMap
hmrPayloads: Map<string, HMR_ACTION_TYPES> hmrPayloads: Map<string, HMR_ACTION_TYPES>
turbopackUpdates: TurbopackUpdate[] turbopackUpdates: TurbopackUpdate[]
subscriptions: Map<string, AsyncIterator<any>> subscriptions: Map<string, AsyncIterator<any>>
...@@ -333,7 +333,7 @@ export async function createHotReloaderTurbopack( ...@@ -333,7 +333,7 @@ export async function createHotReloaderTurbopack(
const changed = await changedPromise const changed = await changedPromise
for await (const change of changed) { for await (const change of changed) {
processIssues(currentIssues, key, change) processIssues(currentEntryIssues, key, change)
const payload = await makePayload(change) const payload = await makePayload(change)
if (payload) { if (payload) {
sendHmr(key, payload) sendHmr(key, payload)
...@@ -347,7 +347,7 @@ export async function createHotReloaderTurbopack( ...@@ -347,7 +347,7 @@ export async function createHotReloaderTurbopack(
await subscription.return?.() await subscription.return?.()
changeSubscriptions.delete(key) changeSubscriptions.delete(key)
} }
currentIssues.delete(key) currentEntryIssues.delete(key)
} }
async function subscribeToHmrEvents(client: ws, id: string) { async function subscribeToHmrEvents(client: ws, id: string) {
...@@ -409,7 +409,7 @@ export async function createHotReloaderTurbopack( ...@@ -409,7 +409,7 @@ export async function createHotReloaderTurbopack(
currentEntrypoints, currentEntrypoints,
changeSubscriptions, changeSubscriptions,
currentIssues, currentEntryIssues: currentEntryIssues,
manifestLoader, manifestLoader,
nextConfig: opts.nextConfig, nextConfig: opts.nextConfig,
rewrites: opts.fsChecker.rewrites, rewrites: opts.fsChecker.rewrites,
...@@ -486,7 +486,7 @@ export async function createHotReloaderTurbopack( ...@@ -486,7 +486,7 @@ export async function createHotReloaderTurbopack(
// TODO: Figure out if socket type can match the NextJsHotReloaderInterface // TODO: Figure out if socket type can match the NextJsHotReloaderInterface
onHMR(req, socket: Socket, head) { onHMR(req, socket: Socket, head) {
wsServer.handleUpgrade(req, socket, head, (client) => { wsServer.handleUpgrade(req, socket, head, (client) => {
const clientIssues: IssuesMap = new Map() const clientIssues: EntryIssuesMap = new Map()
const subscriptions: Map<string, AsyncIterator<any>> = new Map() const subscriptions: Map<string, AsyncIterator<any>> = new Map()
clients.add(client) clients.add(client)
...@@ -582,15 +582,15 @@ export async function createHotReloaderTurbopack( ...@@ -582,15 +582,15 @@ export async function createHotReloaderTurbopack(
client.send(JSON.stringify(turbopackConnected)) client.send(JSON.stringify(turbopackConnected))
const errors: CompilationError[] = [] const errors: CompilationError[] = []
const addIssues = (pageIssues: Map<string, Issue>) => { const addIssues = (entryIssues: Map<string, Issue>) => {
for (const issue of pageIssues.values()) { for (const issue of entryIssues.values()) {
errors.push({ errors.push({
message: formatIssue(issue), message: formatIssue(issue),
}) })
} }
} }
clientIssues.forEach(addIssues) clientIssues.forEach(addIssues)
currentIssues.forEach(addIssues) currentEntryIssues.forEach(addIssues)
const sync: SyncAction = { const sync: SyncAction = {
action: HMR_ACTIONS_SENT_TO_BROWSER.SYNC, action: HMR_ACTIONS_SENT_TO_BROWSER.SYNC,
...@@ -622,22 +622,23 @@ export async function createHotReloaderTurbopack( ...@@ -622,22 +622,23 @@ export async function createHotReloaderTurbopack(
// Not implemented yet. // Not implemented yet.
}, },
async getCompilationErrors(page) { async getCompilationErrors(page) {
const appKey = getEntryKey('app', 'server', page) const appEntryKey = getEntryKey('app', 'server', page)
const pagesKey = getEntryKey('pages', 'server', page) const pagesEntryKey = getEntryKey('pages', 'server', page)
const thisPageIssues = const thisEntryIssues =
currentIssues.get(appKey) ?? currentIssues.get(pagesKey) currentEntryIssues.get(appEntryKey) ??
if (thisPageIssues !== undefined && thisPageIssues.size > 0) { currentEntryIssues.get(pagesEntryKey)
if (thisEntryIssues !== undefined && thisEntryIssues.size > 0) {
// If there is an error related to the requesting page we display it instead of the first error // If there is an error related to the requesting page we display it instead of the first error
return [...thisPageIssues.values()].map( return [...thisEntryIssues.values()].map(
(issue) => new Error(formatIssue(issue)) (issue) => new Error(formatIssue(issue))
) )
} }
// Otherwise, return all errors across pages // Otherwise, return all errors across pages
const errors = [] const errors = []
for (const pageIssues of currentIssues.values()) { for (const entryIssues of currentEntryIssues.values()) {
for (const issue of pageIssues.values()) { for (const issue of entryIssues.values()) {
errors.push(new Error(formatIssue(issue))) errors.push(new Error(formatIssue(issue)))
} }
} }
...@@ -687,7 +688,7 @@ export async function createHotReloaderTurbopack( ...@@ -687,7 +688,7 @@ export async function createHotReloaderTurbopack(
let finishBuilding = startBuilding(pathname, requestUrl, false) let finishBuilding = startBuilding(pathname, requestUrl, false)
try { try {
await handlePagesErrorRoute({ await handlePagesErrorRoute({
currentIssues, currentEntryIssues,
entrypoints: currentEntrypoints, entrypoints: currentEntrypoints,
manifestLoader, manifestLoader,
rewrites: opts.fsChecker.rewrites, rewrites: opts.fsChecker.rewrites,
...@@ -737,7 +738,7 @@ export async function createHotReloaderTurbopack( ...@@ -737,7 +738,7 @@ export async function createHotReloaderTurbopack(
page, page,
pathname, pathname,
route, route,
currentIssues, currentEntryIssues: currentEntryIssues,
entrypoints: currentEntrypoints, entrypoints: currentEntrypoints,
manifestLoader, manifestLoader,
readyIds, readyIds,
...@@ -781,7 +782,7 @@ export async function createHotReloaderTurbopack( ...@@ -781,7 +782,7 @@ export async function createHotReloaderTurbopack(
const errors = new Map<string, CompilationError>() const errors = new Map<string, CompilationError>()
const addErrors = ( const addErrors = (
errorsMap: Map<string, CompilationError>, errorsMap: Map<string, CompilationError>,
issues: IssuesMap issues: EntryIssuesMap
) => { ) => {
for (const issueMap of issues.values()) { for (const issueMap of issues.values()) {
for (const [key, issue] of issueMap) { for (const [key, issue] of issueMap) {
...@@ -798,7 +799,7 @@ export async function createHotReloaderTurbopack( ...@@ -798,7 +799,7 @@ export async function createHotReloaderTurbopack(
} }
} }
} }
addErrors(errors, currentIssues) addErrors(errors, currentEntryIssues)
for (const client of clients) { for (const client of clients) {
const state = clientStates.get(client) const state = clientStates.get(client)
......
...@@ -124,16 +124,16 @@ export function formatIssue(issue: Issue) { ...@@ -124,16 +124,16 @@ export function formatIssue(issue: Issue) {
return message return message
} }
export type IssuesMap = Map<EntryKey, Map<string, Issue>> export type EntryIssuesMap = Map<EntryKey, Map<string, Issue>>
export function processIssues( export function processIssues(
currentIssues: IssuesMap, currentEntryIssues: EntryIssuesMap,
key: EntryKey, key: EntryKey,
result: TurbopackResult, result: TurbopackResult,
throwIssue = false throwIssue = false
) { ) {
const newIssues = new Map<string, Issue>() const newIssues = new Map<string, Issue>()
currentIssues.set(key, newIssues) currentEntryIssues.set(key, newIssues)
const relevantIssues = new Set() const relevantIssues = new Set()
...@@ -229,7 +229,7 @@ export async function handleRouteType({ ...@@ -229,7 +229,7 @@ export async function handleRouteType({
page, page,
pathname, pathname,
route, route,
currentIssues, currentEntryIssues,
entrypoints, entrypoints,
manifestLoader, manifestLoader,
readyIds, readyIds,
...@@ -241,7 +241,7 @@ export async function handleRouteType({ ...@@ -241,7 +241,7 @@ export async function handleRouteType({
pathname: string pathname: string
route: PageRoute | AppRoute route: PageRoute | AppRoute
currentIssues: IssuesMap currentEntryIssues: EntryIssuesMap
entrypoints: Entrypoints entrypoints: Entrypoints
manifestLoader: TurbopackManifestLoader manifestLoader: TurbopackManifestLoader
rewrites: SetupOpts['fsChecker']['rewrites'] rewrites: SetupOpts['fsChecker']['rewrites']
...@@ -261,7 +261,7 @@ export async function handleRouteType({ ...@@ -261,7 +261,7 @@ export async function handleRouteType({
const writtenEndpoint = await entrypoints.global.app.writeToDisk() const writtenEndpoint = await entrypoints.global.app.writeToDisk()
hooks?.handleWrittenEndpoint(key, writtenEndpoint) hooks?.handleWrittenEndpoint(key, writtenEndpoint)
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
} }
await manifestLoader.loadBuildManifest('_app') await manifestLoader.loadBuildManifest('_app')
await manifestLoader.loadPagesManifest('_app') await manifestLoader.loadPagesManifest('_app')
...@@ -272,7 +272,7 @@ export async function handleRouteType({ ...@@ -272,7 +272,7 @@ export async function handleRouteType({
const writtenEndpoint = const writtenEndpoint =
await entrypoints.global.document.writeToDisk() await entrypoints.global.document.writeToDisk()
hooks?.handleWrittenEndpoint(key, writtenEndpoint) hooks?.handleWrittenEndpoint(key, writtenEndpoint)
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
} }
await manifestLoader.loadPagesManifest('_document') await manifestLoader.loadPagesManifest('_document')
...@@ -296,7 +296,7 @@ export async function handleRouteType({ ...@@ -296,7 +296,7 @@ export async function handleRouteType({
pageEntrypoints: entrypoints.page, pageEntrypoints: entrypoints.page,
}) })
processIssues(currentIssues, serverKey, writtenEndpoint) processIssues(currentEntryIssues, serverKey, writtenEndpoint)
} finally { } finally {
// TODO subscriptions should only be caused by the WebSocket connections // TODO subscriptions should only be caused by the WebSocket connections
// otherwise we don't known when to unsubscribe and this leaking // otherwise we don't known when to unsubscribe and this leaking
...@@ -348,7 +348,7 @@ export async function handleRouteType({ ...@@ -348,7 +348,7 @@ export async function handleRouteType({
pageEntrypoints: entrypoints.page, pageEntrypoints: entrypoints.page,
}) })
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
break break
} }
...@@ -391,7 +391,7 @@ export async function handleRouteType({ ...@@ -391,7 +391,7 @@ export async function handleRouteType({
pageEntrypoints: entrypoints.page, pageEntrypoints: entrypoints.page,
}) })
processIssues(currentIssues, key, writtenEndpoint, dev) processIssues(currentEntryIssues, key, writtenEndpoint, dev)
break break
} }
...@@ -414,7 +414,7 @@ export async function handleRouteType({ ...@@ -414,7 +414,7 @@ export async function handleRouteType({
rewrites, rewrites,
pageEntrypoints: entrypoints.page, pageEntrypoints: entrypoints.page,
}) })
processIssues(currentIssues, key, writtenEndpoint, true) processIssues(currentEntryIssues, key, writtenEndpoint, true)
break break
} }
...@@ -442,7 +442,7 @@ export async function handleEntrypoints({ ...@@ -442,7 +442,7 @@ export async function handleEntrypoints({
currentEntrypoints, currentEntrypoints,
currentIssues, currentEntryIssues,
manifestLoader, manifestLoader,
nextConfig, nextConfig,
rewrites, rewrites,
...@@ -456,7 +456,7 @@ export async function handleEntrypoints({ ...@@ -456,7 +456,7 @@ export async function handleEntrypoints({
currentEntrypoints: Entrypoints currentEntrypoints: Entrypoints
currentIssues: IssuesMap currentEntryIssues: EntryIssuesMap
manifestLoader: TurbopackManifestLoader manifestLoader: TurbopackManifestLoader
nextConfig: NextConfigComplete nextConfig: NextConfigComplete
rewrites: SetupOpts['fsChecker']['rewrites'] rewrites: SetupOpts['fsChecker']['rewrites']
...@@ -516,14 +516,14 @@ export async function handleEntrypoints({ ...@@ -516,14 +516,14 @@ export async function handleEntrypoints({
} }
} }
for (const [key] of currentIssues) { for (const [key] of currentEntryIssues) {
const { type, page } = splitEntryKey(key) const { type, page } = splitEntryKey(key)
if ( if (
(type === 'app' && !currentEntrypoints.page.has(page)) || (type === 'app' && !currentEntrypoints.page.has(page)) ||
(type === 'pages' && !currentEntrypoints.app.has(page)) (type === 'pages' && !currentEntrypoints.app.has(page))
) { ) {
currentIssues.delete(key) currentEntryIssues.delete(key)
} }
} }
...@@ -536,7 +536,7 @@ export async function handleEntrypoints({ ...@@ -536,7 +536,7 @@ export async function handleEntrypoints({
const key = getEntryKey('root', 'server', 'middleware') const key = getEntryKey('root', 'server', 'middleware')
// Went from middleware to no middleware // Went from middleware to no middleware
await hooks?.unsubscribeFromChanges(key) await hooks?.unsubscribeFromChanges(key)
currentIssues.delete(key) currentEntryIssues.delete(key)
hooks?.sendHmr('middleware', { hooks?.sendHmr('middleware', {
event: HMR_ACTIONS_SENT_TO_BROWSER.MIDDLEWARE_CHANGES, event: HMR_ACTIONS_SENT_TO_BROWSER.MIDDLEWARE_CHANGES,
}) })
...@@ -558,7 +558,7 @@ export async function handleEntrypoints({ ...@@ -558,7 +558,7 @@ export async function handleEntrypoints({
const writtenEndpoint = await instrumentation[prop].writeToDisk() const writtenEndpoint = await instrumentation[prop].writeToDisk()
hooks?.handleWrittenEndpoint(key, writtenEndpoint) hooks?.handleWrittenEndpoint(key, writtenEndpoint)
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
} }
await processInstrumentation('instrumentation.nodeJs', 'nodeJs') await processInstrumentation('instrumentation.nodeJs', 'nodeJs')
await processInstrumentation('instrumentation.edge', 'edge') await processInstrumentation('instrumentation.edge', 'edge')
...@@ -594,7 +594,7 @@ export async function handleEntrypoints({ ...@@ -594,7 +594,7 @@ export async function handleEntrypoints({
const processMiddleware = async () => { const processMiddleware = async () => {
const writtenEndpoint = await middleware.endpoint.writeToDisk() const writtenEndpoint = await middleware.endpoint.writeToDisk()
hooks?.handleWrittenEndpoint(key, writtenEndpoint) hooks?.handleWrittenEndpoint(key, writtenEndpoint)
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
await manifestLoader.loadMiddlewareManifest('middleware', 'middleware') await manifestLoader.loadMiddlewareManifest('middleware', 'middleware')
if (serverFields) { if (serverFields) {
serverFields.middleware = { serverFields.middleware = {
...@@ -644,14 +644,14 @@ export async function handleEntrypoints({ ...@@ -644,14 +644,14 @@ export async function handleEntrypoints({
} }
export async function handlePagesErrorRoute({ export async function handlePagesErrorRoute({
currentIssues, currentEntryIssues,
entrypoints, entrypoints,
manifestLoader, manifestLoader,
rewrites, rewrites,
hooks, hooks,
}: { }: {
currentIssues: IssuesMap currentEntryIssues: EntryIssuesMap
entrypoints: Entrypoints entrypoints: Entrypoints
manifestLoader: TurbopackManifestLoader manifestLoader: TurbopackManifestLoader
rewrites: SetupOpts['fsChecker']['rewrites'] rewrites: SetupOpts['fsChecker']['rewrites']
...@@ -663,7 +663,7 @@ export async function handlePagesErrorRoute({ ...@@ -663,7 +663,7 @@ export async function handlePagesErrorRoute({
const writtenEndpoint = await entrypoints.global.app.writeToDisk() const writtenEndpoint = await entrypoints.global.app.writeToDisk()
hooks?.handleWrittenEndpoint(key, writtenEndpoint) hooks?.handleWrittenEndpoint(key, writtenEndpoint)
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
} }
await manifestLoader.loadBuildManifest('_app') await manifestLoader.loadBuildManifest('_app')
await manifestLoader.loadPagesManifest('_app') await manifestLoader.loadPagesManifest('_app')
...@@ -677,7 +677,7 @@ export async function handlePagesErrorRoute({ ...@@ -677,7 +677,7 @@ export async function handlePagesErrorRoute({
hooks?.subscribeToChanges(key, false, entrypoints.global.document, () => { hooks?.subscribeToChanges(key, false, entrypoints.global.document, () => {
return { action: HMR_ACTIONS_SENT_TO_BROWSER.RELOAD_PAGE } return { action: HMR_ACTIONS_SENT_TO_BROWSER.RELOAD_PAGE }
}) })
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
} }
await manifestLoader.loadPagesManifest('_document') await manifestLoader.loadPagesManifest('_document')
...@@ -686,7 +686,7 @@ export async function handlePagesErrorRoute({ ...@@ -686,7 +686,7 @@ export async function handlePagesErrorRoute({
const writtenEndpoint = await entrypoints.global.error.writeToDisk() const writtenEndpoint = await entrypoints.global.error.writeToDisk()
hooks?.handleWrittenEndpoint(key, writtenEndpoint) hooks?.handleWrittenEndpoint(key, writtenEndpoint)
processIssues(currentIssues, key, writtenEndpoint) processIssues(currentEntryIssues, key, writtenEndpoint)
} }
await manifestLoader.loadBuildManifest('_error') await manifestLoader.loadBuildManifest('_error')
await manifestLoader.loadPagesManifest('_error') await manifestLoader.loadPagesManifest('_error')
......
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