Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ec438418
Unverified
Commit
ec438418
authored
Aug 18, 2023
by
Shu Ding
Committed by
GitHub
Aug 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing `devPageFiles` collection (#54224)
Closes #54168. This was accidentally removed from a code refactoring.
parent
803bbe5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
setup-dev.ts
packages/next/src/server/lib/router-utils/setup-dev.ts
+5
-0
No files found.
packages/next/src/server/lib/router-utils/setup-dev.ts
View file @
ec438418
...
@@ -84,6 +84,7 @@ import { PageNotFoundError } from '../../../shared/lib/utils'
...
@@ -84,6 +84,7 @@ import { PageNotFoundError } from '../../../shared/lib/utils'
import
{
srcEmptySsgManifest
}
from
'../../../build/webpack/plugins/build-manifest-plugin'
import
{
srcEmptySsgManifest
}
from
'../../../build/webpack/plugins/build-manifest-plugin'
import
{
PropagateToWorkersField
}
from
'./types'
import
{
PropagateToWorkersField
}
from
'./types'
import
{
MiddlewareManifest
}
from
'../../../build/webpack/plugins/middleware-plugin'
import
{
MiddlewareManifest
}
from
'../../../build/webpack/plugins/middleware-plugin'
import
{
devPageFiles
}
from
'../../../build/webpack/plugins/next-types-plugin/shared'
type
SetupOpts
=
{
type
SetupOpts
=
{
dir
:
string
dir
:
string
...
@@ -815,6 +816,7 @@ async function startWatcher(opts: SetupOpts) {
...
@@ -815,6 +816,7 @@ async function startWatcher(opts: SetupOpts) {
appFiles
.
clear
()
appFiles
.
clear
()
pageFiles
.
clear
()
pageFiles
.
clear
()
devPageFiles
.
clear
()
const
sortedKnownFiles
:
string
[]
=
[...
knownFiles
.
keys
()].
sort
(
const
sortedKnownFiles
:
string
[]
=
[...
knownFiles
.
keys
()].
sort
(
sortByPageExts
(
nextConfig
.
pageExtensions
)
sortByPageExts
(
nextConfig
.
pageExtensions
)
...
@@ -924,6 +926,9 @@ async function startWatcher(opts: SetupOpts) {
...
@@ -924,6 +926,9 @@ async function startWatcher(opts: SetupOpts) {
continue
continue
}
}
// Collect all current filenames for the TS plugin to use
devPageFiles
.
add
(
fileName
)
let
pageName
=
absolutePathToPage
(
fileName
,
{
let
pageName
=
absolutePathToPage
(
fileName
,
{
dir
:
isAppPath
?
appDir
!
:
pagesDir
!
,
dir
:
isAppPath
?
appDir
!
:
pagesDir
!
,
extensions
:
nextConfig
.
pageExtensions
,
extensions
:
nextConfig
.
pageExtensions
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment