vercel / next.js

The React Framework
https://nextjs.org
MIT License
126.69k stars 26.94k forks source link

productionBrowserSourceMaps doesn't work with profiler #23756

Open tunesmith opened 3 years ago

tunesmith commented 3 years ago

What version of Next.js are you using?

latest in package.json at time of submission - 10.1.3

What version of Node.js are you using?

14.16.0

What browser are you using?

chrome

What operating system are you using?

macOS

How are you deploying your application?

next build --profile; next start (local in prod mode)

Describe the Bug

Starting with npx create-next-app --example with-typescript with-typescript-app, I added:

module.exports = {
  productionBrowserSourceMaps: true,
}

to next.config.js, and I altered npm run build to run:

    "build": "next build --profile",

Then when I did a build and a start, the React Profiler doesn't show the proper names of the components:

image

Expected Behavior

In prod mode with --profile and productionSourceMaps, I expect profiler to show proper names of components:

image

To Reproduce

See above, I used with-typescript and altered two files.

jankaifer commented 1 year ago

Reproduced in 13.0.6. Repo: https://github.com/JanKaifer/next-repro-23756