diff --git a/src/index.ts b/src/index.ts index f172628d..a457499a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,4 @@ import defu from 'defu' -import { join, resolve } from 'upath' import type { Module } from '@nuxt/types' import type { SanityClient } from '@sanity/client' @@ -76,6 +75,7 @@ const nuxtModule: Module = function (moduleOptions) { const { bold }: typeof import('chalk') = process.client ? /* istanbul ignore next */ {} : require('chalk') const consola: typeof import('consola').default = process.client ? /* istanbul ignore next */ {} : require('consola') + const { join, resolve }: typeof import('upath') = process.client ? /* istanbul ignore next */ {} : require('upath') let sanityConfig: Record = {} diff --git a/test/e2e/bundle.test.ts b/test/e2e/bundle.test.ts index 67d12c8c..428adf89 100644 --- a/test/e2e/bundle.test.ts +++ b/test/e2e/bundle.test.ts @@ -3,7 +3,7 @@ import { readdirSync, readFileSync } from 'fs-extra' import { setupTest, getNuxt } from '@nuxt/test-utils' -const serverDeps = ['chalk', 'consola', 'fs-extra'] +const serverDeps = ['chalk', 'consola', 'fs-extra', 'upath'] describe('built files', () => { setupTest({