Static GitHub Issues

[3236] Pass options to serverMiddleware

prev: nuxt before generate asyncData axios data is fixed not update
next: lodash works perfectly at initial load, however when I refresh I get this error "_ is not defined"

What problem does this feature solve?

Configuring a "generic" serverMiddleware is nearly impossible at the moment because an array of relative paths is the only way to pass them to nuxt. (See the code reference)

What does the proposed changes look like?

It'd be great to do it similar to the modules system by allowing array with option objects:

(Modules example)

modules: [
    '@nuxtjs/pwa',
    ['@nuxtjs/axios', { baseURL: 'xxx' }]
  ]
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This feature request is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c6924">#c6924</a>)</em></sub></div>