Skip to content

Commit 451b000

Browse files
committed
fix: add missing imports
1 parent 0cfc71c commit 451b000

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/module.ts

+11
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,17 @@ export default defineNuxtModule<ModuleOptions>({
566566
nuxt.options.runtimeConfig.public.content.previewAPI = process.env.NUXT_PREVIEW_API
567567
// @ts-ignore
568568
nuxt.options.runtimeConfig.content.previewAPI = process.env.NUXT_PREVIEW_API
569+
570+
if (nuxt.options.vite !== false) {
571+
nuxt.options.vite = defu(
572+
nuxt.options.vite === true ? {} : nuxt.options.vite,
573+
{
574+
optimizeDeps: {
575+
include: ['socket.io-client', 'slugify']
576+
}
577+
}
578+
)
579+
}
569580
}
570581

571582
// Setup content dev module

src/runtime/composables/client-db.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import type { Storage } from 'unstorage'
22
// @ts-ignore
33
import LSDriver from 'unstorage/drivers/localstorage'
44
import { createStorage, prefixStorage } from 'unstorage'
5+
import { useRuntimeConfig, useCookie } from '#app'
6+
import { withBase } from 'ufo'
57
import { createPipelineFetcher } from '../query/match/pipeline'
68
import { createQuery } from '../query/query'
79
import type { NavItem, ParsedContent, ParsedContentMeta, QueryBuilderParams } from '../types'
810
import { createNav } from '../server/navigation'
911

12+
const withContentBase = url => withBase(url, '/api/' + useRuntimeConfig().public.content.base)
13+
1014
export const contentStorage = prefixStorage(createStorage({ driver: LSDriver() }), '@content')
1115

1216
export const getPreview = () => {

0 commit comments

Comments
 (0)