mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
feat(nuxt): add URL
serialiser for dev server logs
This commit is contained in:
parent
2440007906
commit
a549b46e90
@ -12,6 +12,7 @@ const devRevivers: Record<string, (data: any) => any> = import.meta.server
|
||||
? {}
|
||||
: {
|
||||
VNode: data => h(data.type, data.props),
|
||||
URL: data => new URL(data),
|
||||
}
|
||||
|
||||
export default defineNuxtPlugin(async (nuxtApp) => {
|
||||
|
@ -14,6 +14,7 @@ import { rootDir } from '#internal/dev-server-logs-options'
|
||||
|
||||
const devReducers: Record<string, (data: any) => any> = {
|
||||
VNode: data => isVNode(data) ? { type: data.type, props: data.props } : undefined,
|
||||
URL: data => data instanceof URL ? data.toString() : undefined,
|
||||
}
|
||||
|
||||
interface NuxtDevAsyncContext {
|
||||
|
Loading…
Reference in New Issue
Block a user