nuxt-modules / algolia

🔎 Algolia module for Nuxt
https://algolia.nuxtjs.org/
MIT License
185 stars 32 forks source link

Add option to enable requester-fetch instead of requester-node-http for edge-environments like Cloudflare Workers #176

Closed vilhelmjosander closed 9 months ago

vilhelmjosander commented 10 months ago

Types of changes

Description

This PR enables support for using this module in edge-environments which usually does not have access to nodes http module. Examples would be Cloudflare Workers or Vercel Edge (https://vercel.com/docs/functions/edge-functions/edge-runtime). By enabling useFetch in the configuration it will use @algolia/requester-fetch instead of @algolia/requester-node-http when process.server is true.

Checklist:

nuxt-studio[bot] commented 10 months ago

Live Preview ready!

Name Edit Preview Latest Commit
Algolia Edit on Studio ↗︎ View Live Preview 0195a5a43eee3f7ea28bd717851494db7bf2a88c
Baroshem commented 9 months ago

Hey, thanks for this PR!

I will take a look at it soon :)

vilhelmjosander commented 9 months ago

Any updates on when 2.0.0 will be released? There is no way this can be merged as a minor version until then?

Baroshem commented 9 months ago

Hey @vilhelmjosander

I am planning to release the 2.0.0 next week. I was just very busy with Nuxt Security 1.0.0 release for the Nuxt Nation that is happening just now.

If I wont make it to release 2.0.0 version next week, then I will release a minor version with this feature so that you could start using it :)

Baroshem commented 9 months ago

Hey @vilhelmjosander

I have changed the base branch from main to 1.10.0 and I want to release it this week. Could you please resolve the conflicts and remove the additional package-lock.json?

Then I will merge it and release a new version with it :)

vilhelmjosander commented 9 months ago

@Baroshem Sorry for the late reply. I have fixed the merge conflicts and removed the package-lock.json. Make sure it looks ok then it should be ready to merge and release.

Baroshem commented 9 months ago

@vilhelmjosander I will work on making the release today then.

Thanks for your work!