Home

Issue: 335

Store and middleware location as aliases

[issue link]

Hello guys,

I’m trying to write a nuxt starter library where all my apps will inherit some predefined pages, routes, plugins, etc.

I have the following structure :

screen shot 2017-03-03 at 12 29 17 am

For the structure to be complete I’m looking for a way to have nuxt load middlewares and stores from another location than the srcDir (in this case the .portal dir).

I see two ways to achieve that :

  1. Have store and middleware as aliases like the ~plugins so that it can be changed in build { extend(config) { ... } }
  2. Instruct nuxt to look for stores and middlewares in multiple locations

For both, I’ll have to fork the project I guess. Is there a way to achieve that with the current API ?

Thanks.

This question is available on Nuxt.js community (#c288)