Skip to content

Commit

Permalink
fix: explicitely declare dependencies for runtime directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Jun 28, 2022
1 parent 26bf287 commit 204e628
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default defineNuxtModule<PrismicModuleOptions>({

// Runtime dir boilerplate
const resolver = createResolver(import.meta.url)
nuxt.options.build.transpile.push(resolver.resolve('runtime'), '@prismicio/vue')
nuxt.options.build.transpile.push(resolver.resolve('runtime'), '@nuxtjs/prismic', '@prismicio/vue')

// Add runtime user code
const proxyUserFileWithUndefinedFallback = (filename: string, path?: string, extensions = ['js', 'mjs', 'ts']) => {
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
</template>

<script setup>
import { useHead, usePrismicPreview } from '#imports'
useHead({
title: 'Prismic Preview - Loading'
})
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/usePrismicPreview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { onMounted } from 'vue'

import { useRouter, usePrismic } from '#imports'

/**
* Resolves Prismic previews on the preview entry page (`/preview`)
*
Expand Down

0 comments on commit 204e628

Please sign in to comment.