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

How to load modules before plugins in nuxt.config #1127

Closed
solonik1 opened this Issue Jul 20, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@solonik1

solonik1 commented Jul 20, 2017

Nuxt loads plugins before modules (@nuxtjs/axios). Thus the axios instance is not available in plugins. How to change it? thx for your help!

This feature request is available on Nuxt.js community (#c991)
@pi0

This comment has been minimized.

Member

pi0 commented Jul 20, 2017

Hi. If about Axios module, It is also providing a plugin itself :) Would you please share generated .nuxt/index.js file? I think problem is that it should register plugin as the first.

@solonik1

This comment has been minimized.

solonik1 commented Jul 20, 2017

index.js.txt

Hi pi0. Thank you for your response. Generated index.js is attached. I use axios plugin in '~plugins/auth'

@Atinux

This comment has been minimized.

Member

Atinux commented Jul 20, 2017

Hi @solonik1

This is fixed already for 1.0, see https://github.com/nuxt/nuxt.js/blob/dev/lib/core/module.js#L62

pi0 added a commit to nuxt-community/modules that referenced this issue Jul 20, 2017

@solonik1

This comment has been minimized.

solonik1 commented Jul 20, 2017

@pi0, @Atinux Thank you very much.

@pi0

This comment has been minimized.

Member

pi0 commented Jul 20, 2017

@solonik1 Temporary patch published with @nuxtjs/axios:2.2.4 please upgrade :)

@solonik1 solonik1 closed this Jul 20, 2017

@lock

This comment has been minimized.

lock bot commented Nov 3, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 3, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.