packages/next/client/dev-error-overlay/hot-dev-client.js
function handleWarnings (warnings) {
  clearOutdatedErrors()

  // Print warnings to the console.
  const formatted = formatWebpackMessages({
    warnings: warnings,
    errors: []
  })

  if (typeof console !== 'undefined' && typeof console.warn === 'function') {
    for (let i = 0; i < formatted.warnings.length; i++) {
      if (i === 5) {
        console.warn(
          'There were more warnings in other files.\n' +
            'You can find a complete log in the terminal.'
        )
        break
      }
      console.warn(stripAnsi(formatted.warnings[i]))
    }
  }
}
function handleWarnings (warnings) {
  clearOutdatedErrors()

  // Print warnings to the console.
  const formatted = formatWebpackMessages({
    warnings: warnings,
    errors: []
  })

  if (typeof console !== 'undefined' && typeof console.warn === 'function') {
    for (let i = 0; i < formatted.warnings.length; i++) {
      if (i === 5) {
        console.warn(
          'There were more warnings in other files.\n' +
            'You can find a complete log in the terminal.'
        )
        break
      }
      console.warn(stripAnsi(formatted.warnings[i]))
    }
  }
}
Compilation with warnings (e.g. ESLint).