Closed markphelps closed 5 months ago
hi everyone ! 🙂
Short follow up on the topic: it seems like the flipt provider is not built to be used on a "browser" environment (as it relies on open-feature/server-sdk
).
My resulting question is the following one: Is it planned to have a provider version based on openfeature/web-sdk
instead of open-feature/server-sdk
? This would probably solve my issue if it is the case.
Have a nice day! Aviran
Hey @avi-ran, yes that's the issue. In this case, the web SDK has a polyfill that simulates the eventing library in Node. It's worth noting that the web and server SDKs work fundamentally differently. You can read about it here.
Perhaps @markphelps could speak on any plans of creating a web provider. Perhaps Flipt would also be interested in adding support for the OpenFeature Remote Evaluation Protocol.
Hey @beeme1mr ! Yes I think we can definitely create an openfeature/web-sdk now as we just released our browser SDK
@avi-ran would you be interested in helping us create ^? if not no worries, just figured it might be nice to have someone who knows javascript/typescript better than me ;)
Also, @beeme1mr . I'd love to chat with you about OFREP at some point as im not sure I fully understand it yet
@markphelps sure, that would be great. I think OFREP would work well in Flipt. In a nutshell, it's an open api definition and provider implementations. That means you wouldn't need to build and maintain providers to have great OpenFeature support. This is especially useful for web and mobile use cases.
@avi-ran i pushed up the initial scaffolding of the OF flipt-web
provider here: https://github.com/flipt-io/js-sdk-contrib/compare/main...flipt-io:js-sdk-contrib:flipt-web?expand=1
Now just need to implement it ;)
@avi-ran I have a PR up for the open feature Flipt web provider here: https://github.com/open-feature/js-sdk-contrib/pull/879
From our Discord: https://discord.com/channels/960634591000014878/1227377993513439372/1227377993513439372
A user is trying to use the Flipt OpenFeature JS provider in their Vue2/Vite front-end code.
When they import the provider lib :
and run Vite, they end up with the following error in their dev console:
dependencies installed:
Did we not implement something correctly in the Flipt Server Provider?