You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps described also in the readme of the reproduction repo
Clone the reproduction repo and:
npm install
npm run build
npm run start
Open the app in the browser (localhost:3000), open the devtools and navigate through the pages.
Open (in the source panel) the sourcemaps relative to the /content/[subject]/[method]/index.page.tsx page, you will see that the sourcemaps are not there (chrome will show a 404 error).
The chunk is actually generated by next build but seems like it's not picked up by the server (my guess)
This happens to all the index.page.tsx pages with a dynamic route ([whatever]) with a level deeper than 1 (so /content/[subject]/index.page.tsx has the sourcemaps visible in the browser).
Note that it doesn't happen in a page that has a name different than index (e.g. /content/[subject]/[method]/named.page.tsx)
Current vs. Expected behavior
Current behaviour
sourcemaps on index pages with a dynamic route level deeper than 1 are not loaded
Expected behaviour
Any page sourcemap should be loaded in the browser
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020
Available memory (MB): 16384
Available CPU cores: 12
Binaries:
Node: 20.8.0
npm: 10.1.0
Yarn: 1.22.21
pnpm: 8.8.0
Relevant Packages:
next: 14.2.3 // Latest available version is detected (14.2.3).
eslint-config-next: N/A
react: 18.3.1
react-dom: 18.3.1
typescript: 5.4.5
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local)
Additional context
I tested this in multiple browsers (safari, chrome and firefox (all latest versions))
Tried with both pageExtensions and without it and seems to affect both
I did not test it with app router because this affect an application I'm working on that cannot migrate to app router yet
The bug seems to affect only index pages (not pages with a different name), as it's described in the reproduction repo
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/albertodeago/next-sourcemaps-repro
To Reproduce
Steps described also in the readme of the reproduction repo
Clone the reproduction repo and:
Open the app in the browser (
localhost:3000
), open the devtools and navigate through the pages.Open (in the source panel) the sourcemaps relative to the
/content/[subject]/[method]/index.page.tsx
page, you will see that the sourcemaps are not there (chrome will show a 404 error).The chunk is actually generated by
next build
but seems like it's not picked up by the server (my guess)This happens to all the
index.page.tsx
pages with a dynamic route ([whatever]
) with a level deeper than 1 (so/content/[subject]/index.page.tsx
has the sourcemaps visible in the browser).Note that it doesn't happen in a page that has a name different than
index
(e.g./content/[subject]/[method]/named.page.tsx
)Current vs. Expected behavior
Current behaviour
sourcemaps on
index
pages with a dynamic route level deeper than 1 are not loadedExpected behaviour
Any page sourcemap should be loaded in the browser
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 Available memory (MB): 16384 Available CPU cores: 12 Binaries: Node: 20.8.0 npm: 10.1.0 Yarn: 1.22.21 pnpm: 8.8.0 Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local)
Additional context
I tested this in multiple browsers (safari, chrome and firefox (all latest versions))
Tried with both
pageExtensions
and without it and seems to affect bothI did not test it with app router because this affect an application I'm working on that cannot migrate to app router yet
The bug seems to affect only
index
pages (not pages with a different name), as it's described in the reproduction repoThe text was updated successfully, but these errors were encountered: