Skip to content

[FR] Export BaseModel at the module level #615

Open
@FossPrime

Description

@FossPrime

Description

BaseModel should be exported at the feathers-vuex module level so we can take advantage of the two step Js Module compilation.

Currently, we have to initialize feathers-vuex at runtime to get access to the static BaseModel. This is particularly helpful when you need to asynchronously fetch Feathers endpoint configuration from a server or a service worker cache and you can't synchronously initialize feathers-vuex.

Workaround

Initialize feathers-vuex twice... Once at compilation time with a throwaway server alias and a fake feathersClient instance, just to get the BaseModel to re-export, and then a second time at runtime with the real feathersClient for the Feathers-vuex you'll actually use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions