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

[Feature request] Add support for lazy loading modules #68

Open
lyle45 opened this issue Mar 7, 2021 · 6 comments
Open

[Feature request] Add support for lazy loading modules #68

lyle45 opened this issue Mar 7, 2021 · 6 comments

Comments

@lyle45
Copy link

lyle45 commented Mar 7, 2021

Add support for lazy loading vuex modules and adding them to the direct store. Not sure how Typescript would work in those cases or even of its possible, but this would be needed either way

@paleo
Copy link
Collaborator

paleo commented Apr 20, 2021

They still can be added to the original vuex store…

@lyle45
Copy link
Author

lyle45 commented Apr 21, 2021

@paleo true but could i access them directly or would i need to use magic string?

@lyle45
Copy link
Author

lyle45 commented Apr 21, 2021

@paleo maybe typescript type imports can be used here for optional modules?
https://davidea.st/articles/typescript-2-9-import-types

Edit: Couldn't find information about this feature in newer version of TS so I'm not sure it was continued... Would've been good for this though

@paleo
Copy link
Collaborator

paleo commented Apr 21, 2021

@paleo true but could i access them directly or would i need to use magic string?

The original Vuex string system would be needed.

Maybe a solution could be to implement the runtime part only, without typing. In order to dynamically generate the wrappers after the initialization. But I'm unsure of how it can be useful.

Additionally, I don't plan to work on this package except for bug fix. Because the future Vuex 5 will make it obsolete.

@lyle45
Copy link
Author

lyle45 commented Apr 21, 2021

@paleo

Additionally, I don't plan to work on this package except for bug fix. Because the future Vuex 5 will make it obsolete.

Ouch that is sad to hear for now. While true, Vuex 5 will take a really long time to become mainstream while even vuex 4 is still @next

That should be written in Readme

@paleo
Copy link
Collaborator

paleo commented Apr 21, 2021

… but I'll accept pull requests with useful new features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants