mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Allows unambigious assertions on CLI output. Not that interesting for dev but `next build` will have the logs for all pages in all tests. I also made the pages static where possible so that we'll be able to assert on the logged errors during `next build`.
13 lines
508 B
JavaScript
13 lines
508 B
JavaScript
// Compile with pnpm tsc test/e2e/app-dir/server-source-maps/fixtures/default/bad-sourcemap/page.js --allowJs --sourceMap --target esnext --outDir test/e2e/app-dir/server-source-maps/fixtures/default/app/bad-sourcemap
|
|
// Then change the `sources` entry in the sourcemap to `["custom://[badhost]/app/bad-sourcemap/page.js"]`
|
|
// tsc compile errors can be ignored
|
|
|
|
function logError() {
|
|
console.error(new Error('bad-sourcemap'))
|
|
}
|
|
|
|
export default function Page() {
|
|
logError()
|
|
return <p>Hello, Dave!</p>
|
|
}
|