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

Import store in eager components causes a circular dependency #112

Open
stefanosandes opened this issue Jan 18, 2017 · 0 comments
Open

Import store in eager components causes a circular dependency #112

stefanosandes opened this issue Jan 18, 2017 · 0 comments

Comments

@stefanosandes
Copy link

The problems only happens on eager components.

For example:

If you import and log the store on app/auth/components/main.vue, the output is the store object. But, if you make this component eager and run de test again, the output will be undefined.

I belive that the problem is caused by an circular dependency:

store/index -> store/modules -> app/index -> app/routes -> app/auth/index -> app/auth/routes -> app/auth/components/main -> src/store

In my specific case, a need to use the store inside de vue-router beforeRouteEnter guard to access some info in the store. Inside this guard, this.$route will not be available, because the component instance has no created yet.

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

No branches or pull requests

2 participants