From ff535fb1110a123fccde2e6088e355ca0c0eb7b6 Mon Sep 17 00:00:00 2001 From: lihbr Date: Thu, 5 Dec 2024 09:47:30 +0100 Subject: [PATCH] fix: compile logger correctly --- src/runtime/logger.ts | 3 +++ src/runtime/plugin.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/runtime/logger.ts diff --git a/src/runtime/logger.ts b/src/runtime/logger.ts new file mode 100644 index 0000000..abee444 --- /dev/null +++ b/src/runtime/logger.ts @@ -0,0 +1,3 @@ +import { consola } from 'consola' + +export const logger = consola.withTag('nuxt:prismic') diff --git a/src/runtime/plugin.ts b/src/runtime/plugin.ts index 8f72b6d..363195c 100644 --- a/src/runtime/plugin.ts +++ b/src/runtime/plugin.ts @@ -2,7 +2,7 @@ import { createClient, type Client } from '@prismicio/client' import { createPrismic } from '@prismicio/vue' import type { PrismicModuleOptions } from '../types' -import { logger } from '../lib/logger' +import { logger } from './logger' import { defineNuxtPlugin } from '#app' import NuxtLink from '#app/components/nuxt-link' import { useCookie, useRequestEvent, onNuxtReady, refreshNuxtData, useHead, useRuntimeConfig, useRouter } from '#imports'