codedbychavez / configcat-vue

Vue.js SDK for ConfigCat Feature Flags (community maintained)
https://configcat.com/docs/sdk-reference/community/vue/
3 stars 1 forks source link

Fix SDK version reporting #6

Closed adams85 closed 1 year ago

adams85 commented 1 year ago

As one of the lead ConfigCat developers pointed out while discussing this project, the Vue plugin should report its own identifier and version when polling for changes, just like the React wrapper does.

This means the plugin should be built on top of configcat-common instead of configcat-js (which provides the ConfigCat SDK functionality to generic browser apps and has its own specific identifier).

Also, the current build setup produces only dist builds which bundle the underlying ConfigCat SDK package (configcat-common). Because of this, it should be a devDependency for now. (Later we may consider including also a non-prebundled build like official ConfigCat SDKs do.)

However, since configcat-common is included in the dist builds currently, it's important to re-export the ConfigCat SDK public API (see commit 6b3eb5655a00a97606b16d52f1691db034330d52) so consumers of the plugin can import and use those types when interacting with the ConfigCat client in their applications.

After applying these changes, the sample app should also drop the conficat-js package dependency and import ConfigCat SDK types from configcat-vue.