Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Algolia DocSearch (#40) #153

Merged
merged 8 commits into from
Nov 27, 2020
Merged

feat: add Algolia DocSearch (#40) #153

merged 8 commits into from
Nov 27, 2020

Conversation

posva
Copy link
Member

@posva posva commented Nov 25, 2020

Still waiting for keys to add it to vitepress docs

@kiaking kiaking added the enhancement New feature or request label Nov 25, 2020
@posva
Copy link
Member Author

posva commented Nov 26, 2020

I'm struggling to migrate this component to script setup because I get this runtime error

Screen Shot 2020-11-26 at 11 11 32

But that's a TS type. I pushed a version with a dynamic import, which I don't think is normal. I tested using a file that exports types and importing them on a component breaks, so I think that's a bug

@kiaking
Copy link
Member

kiaking commented Nov 26, 2020

@posva You might wanna try import type { ... } from '...'?

From #137 (comment)

One quirk discovered is that when using <script setup lang="ts"> it is necessary to explicitly mark type imports with import type { X } from '...' otherwise it will be used as a value in the setup return statement. It should be technically possible to avoid this limitation with more sophisticated analysis but for now I don't think it's a deal breaker.

@posva
Copy link
Member Author

posva commented Nov 27, 2020

This should be good now!

@kiaking
Copy link
Member

kiaking commented Nov 27, 2020

Niiice!

@kiaking kiaking changed the title feat: add Algolia DocSearch feat: add Algolia DocSearch (#40) Nov 27, 2020
@kiaking kiaking merged commit 5bb4730 into master Nov 27, 2020
@kiaking kiaking deleted the feat/algoliasearch branch November 27, 2020 16:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants