Nuxt.js: How to load modules before plugins in nuxt.config

Created on 20 Jul 2017  路  6Comments  路  Source: nuxt/nuxt.js

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)
available soon enhancement

Most helpful comment

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

All 6 comments

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.

index.js.txt

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

Hi @solonik1

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

@pi0, @Atinux Thank you very much.

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nassimbenkirane picture nassimbenkirane  路  3Comments

vadimsg picture vadimsg  路  3Comments

gary149 picture gary149  路  3Comments

bimohxh picture bimohxh  路  3Comments

uptownhr picture uptownhr  路  3Comments