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

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

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

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

solonik1 opened this issue Jul 20, 2017 · 6 comments

Comments

@solonik1
Copy link

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
Copy link
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
Copy link
Author

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
Copy link
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 pushed a commit to nuxt-community/legacy-modules that referenced this issue Jul 20, 2017
@solonik1
Copy link
Author

@pi0, @Atinux Thank you very much.

@pi0
Copy link
Member

pi0 commented Jul 20, 2017

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

@lock
Copy link

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
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants