Files
Cong-Cong PanandGitHub affb52dafc chore: update rspack 1.6.5 (#86853)
update @next/rspack-core version to 1.0.2 and update the snapshot

other changes:

- packages/next/src/build/webpack-config.ts
Adjusted configuration to account for differences in default node config
between Rspack and Webpack.

- packages/next/src/shared/lib/format-webpack-messages.ts
Added a fallback to moduleIdentifier in cases where Rspack does not
correctly populate moduleName.
2025-12-17 05:07:52 +00:00

29 lines
806 B
TypeScript

import { nextTestSetup } from 'e2e-utils'
import stripAnsi from 'strip-ansi'
describe('build-error-logs', () => {
const { next, isTurbopack, isRspack } = nextTestSetup({
files: __dirname,
})
it('should only log error a single time', async () => {
await next.fetch('/')
const output = stripAnsi(next.cliOutput)
expect(output).toContain('Module not found')
const moduleNotFoundLogs = output
.split('\n')
.filter((line) => line.includes('Module not found'))
if (isTurbopack) {
expect(moduleNotFoundLogs).toHaveLength(1)
} else if (isRspack) {
expect([2, 3]).toContain(moduleNotFoundLogs.length)
} else {
// FIXME: next with webpack still logs the same error too many times
expect(moduleNotFoundLogs).toHaveLength(3)
}
})
})