mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +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),
|
VNode: data => h(data.type, data.props),
|
||||||
|
URL: data => new URL(data),
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineNuxtPlugin(async (nuxtApp) => {
|
export default defineNuxtPlugin(async (nuxtApp) => {
|
||||||
|
@ -14,6 +14,7 @@ import { rootDir } from '#internal/dev-server-logs-options'
|
|||||||
|
|
||||||
const devReducers: Record<string, (data: any) => any> = {
|
const devReducers: Record<string, (data: any) => any> = {
|
||||||
VNode: data => isVNode(data) ? { type: data.type, props: data.props } : undefined,
|
VNode: data => isVNode(data) ? { type: data.type, props: data.props } : undefined,
|
||||||
|
URL: data => data instanceof URL ? data.toString() : undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
interface NuxtDevAsyncContext {
|
interface NuxtDevAsyncContext {
|
||||||
|
Loading…
Reference in New Issue
Block a user