Static GitHub Issues

[273] Should nuxtServerInit run before middleware?

prev: extendedRoutes not working with nuxt generate
next: babel defaults (babel-preset-vue-app)

I was surprised to see nuxtServerInit running before my projects middleware. I was attempting to add some information to the context within my middleware and then make use of it inside nuxtServerInit.

I was able to work around this by moving my middleware logic directly inside of nuxtServerInit.

Is the order in which these run currently intentional?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c235">#c235</a>)</em></sub></div>