mantra-cli icon indicating copy to clipboard operation
mantra-cli copied to clipboard

skip creation of routes

Open macrozone opened this issue 7 years ago • 4 comments

I usually only use routes in core, because having routes in multiple modules may lead to re-renderings (see https://github.com/mantrajs/mantra-core/issues/9), so it would be cool to just be able to disable route generation in other modules than core (maybe via setting)

macrozone avatar Mar 10 '17 13:03 macrozone

That's fair. Do you have plans for how to implement it?

sungwoncho avatar Mar 10 '17 23:03 sungwoncho

hmm...

  • [ ] config createRoutesOnModules: true/false
  • [ ] do not create route file when createRoutesOnModules is false (if its not core module, i think we should always create it)
  • [ ] verfiy that the module index file does not import the route file when createRoutesOnModules is false

macrozone avatar Mar 13 '17 11:03 macrozone

that makes sense. Feel free to open a PR and I will review it before we release.

sungwoncho avatar Mar 14 '17 08:03 sungwoncho

This would also help with React-router as routes for rr are only in core.

StorytellerCZ avatar Mar 15 '17 09:03 StorytellerCZ