fix: use dynamic import for types

pull/153/head
Eduardo San Martin Morote 5 years ago
parent 2ea51e7ee8
commit 743ece0745

@ -3,7 +3,6 @@
</template>
<script setup lang="ts">
import { AlgoliaSearchOptions } from 'algoliasearch'
import { useRoute, useRouter } from 'vitepress'
import { defineProps, getCurrentInstance, onMounted, watch } from 'vue'
@ -25,7 +24,10 @@ function getRelativePath(absoluteUrl: string) {
return url
}
const { options } = defineProps<{ options: AlgoliaSearchOptions }>()
const { options } = defineProps<{
// Using a regular import breaks at runtime
options: import('algoliasearch').AlgoliaSearchOptions
}>()
const route = useRoute()
const router = useRouter()

Loading…
Cancel
Save