Skip to content

Commit

Permalink
remove metadataBase warning
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Apr 10, 2023
1 parent 772f3e7 commit c731c02
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 84 deletions.
6 changes: 0 additions & 6 deletions packages/next/src/lib/metadata/resolvers/resolve-url.ts
@@ -1,5 +1,4 @@
import path from '../../../shared/lib/isomorphic/path'
import * as Log from '../../../build/output/log'

function isStringOrURL(icon: any): icon is string | URL {
return typeof icon === 'string' || icon instanceof URL
Expand All @@ -26,11 +25,6 @@ function resolveUrl(

if (!metadataBase) {
metadataBase = new URL(`http://localhost:${process.env.PORT || 3000}`)
// Development mode warning, add new line prefix for worker output
console.log()
Log.warn(
`metadata.metadataBase is not set for resolving url "${url}", fallbacks to "${metadataBase.origin}". See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase`
)
}

// Handle relative or absolute paths
Expand Down

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions test/e2e/app-dir/metadata-missing-metadata-base/app/layout.js

This file was deleted.

31 changes: 0 additions & 31 deletions test/e2e/app-dir/metadata-missing-metadata-base/index.test.ts

This file was deleted.

This file was deleted.

0 comments on commit c731c02

Please sign in to comment.