nuxt-structure-with-modules icon indicating copy to clipboard operation
nuxt-structure-with-modules copied to clipboard

Automated tooling or way to auto adapt to this structure

Open apgapg opened this issue 3 years ago • 4 comments

Hi @areindl ,

Thank you for this sample. I was wondering if there's a way where we can extend nuxt core so as to auto read our new dir structure?

Currently we need to define our strategy in a module's index.js, which seems a little overhead everytime we define a new module.

apgapg avatar Feb 07 '22 09:02 apgapg

Hi @apgapg!

Yes. Makes sense. I will think about it.

Do you have an idea about doing that?

areindl avatar Mar 11 '22 15:03 areindl

Some parts we can do automatically like registering components by writing a script. Little skeptical about auto route generation part (although manually can be done). Similarly for store we can have that but all this tooling script will be external and nothing i can think of directly adding them by extending nuxt core

apgapg avatar Mar 13 '22 11:03 apgapg

Maybe some webpack related configuration can help 🤔

rodolfo-santos avatar Apr 15 '22 01:04 rodolfo-santos

@apgapg @rodolfo-santos with Nuxt 3's new module loading, the need to register the module is not loading existing.

Check out my last commit. The module is loading loading automatically.

What's left is the auto-registry of routes. I have mixed feelings about it. Do you think it is necessary?

areindl avatar Jan 04 '24 14:01 areindl