Skip to content

Commit

Permalink
fix: add missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Sep 29, 2022
1 parent 0cfc71c commit 451b000
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/module.ts
Expand Up @@ -566,6 +566,17 @@ export default defineNuxtModule<ModuleOptions>({
nuxt.options.runtimeConfig.public.content.previewAPI = process.env.NUXT_PREVIEW_API
// @ts-ignore
nuxt.options.runtimeConfig.content.previewAPI = process.env.NUXT_PREVIEW_API

if (nuxt.options.vite !== false) {
nuxt.options.vite = defu(
nuxt.options.vite === true ? {} : nuxt.options.vite,
{
optimizeDeps: {
include: ['socket.io-client', 'slugify']
}
}
)
}
}

// Setup content dev module
Expand Down
4 changes: 4 additions & 0 deletions src/runtime/composables/client-db.ts
Expand Up @@ -2,11 +2,15 @@ import type { Storage } from 'unstorage'
// @ts-ignore
import LSDriver from 'unstorage/drivers/localstorage'
import { createStorage, prefixStorage } from 'unstorage'
import { useRuntimeConfig, useCookie } from '#app'
import { withBase } from 'ufo'
import { createPipelineFetcher } from '../query/match/pipeline'
import { createQuery } from '../query/query'
import type { NavItem, ParsedContent, ParsedContentMeta, QueryBuilderParams } from '../types'
import { createNav } from '../server/navigation'

const withContentBase = url => withBase(url, '/api/' + useRuntimeConfig().public.content.base)

export const contentStorage = prefixStorage(createStorage({ driver: LSDriver() }), '@content')

export const getPreview = () => {
Expand Down

0 comments on commit 451b000

Please sign in to comment.