Skip to content

Commit

Permalink
fix: exclude upath from client bundle
Browse files Browse the repository at this point in the history
closes #66
  • Loading branch information
danielroe committed Jan 31, 2021
1 parent 6a75f29 commit 88b7d58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -76,6 +75,7 @@ const nuxtModule: Module<SanityModuleOptions> = 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<string, any> = {}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/bundle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 88b7d58

Please sign in to comment.