Open azu opened 2 weeks ago
It seems that the Next.js v15 does not output the source-map
file anymore even sets config.devtool='source-map'
, it always reverting devtool to default eval-source-map
, we can see it in the file begin comments
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
Currently, MCR does not support parsing sourcemap from the eval-source-map
.
I'll look into how to get sourcemap from eval, not sure if it will work, but it shoud work if you can downgrad from Nextjs v15 to v14.
Describe the bug
I've tested next-with-playwright with Next.js 15, but the coverage file refer to js file, not ts file. https://github.com/cenfun/nextjs-with-playwright
Probably, it can not resolve source-map.
To Reproduce
Coverage refer to *.js files.
Reproduce repository:
Expected behavior
Coverage for
*.tsx
filesErrors or Screenshots
Make a minimal reproduction
Additional context
I've checked https://nextjs.org/docs/messages/improper-devtool, but the result is not changed.