s00d / nuxt-i18n-micro

Nuxt I18n Micro is a fast, simple, and lightweight internationalization (i18n) module for Nuxt
https://s00d.github.io/nuxt-i18n-micro/
MIT License
87 stars 11 forks source link

Routes without name leads to unwanted behaviours and memory usage #46

Closed Rigo-m closed 1 month ago

Rigo-m commented 1 month ago

Sometimes, due to a bad routing management or to custom routes being set without name in the nuxt config, there can be some routes without name. When this happens, all routes gets appended as children of that unnamed route. https://github.com/s00d/nuxt-i18n-micro/blob/51a2ff9d7c35987f12e81ad5b7e3fd188ee167a4/src/page-manager.ts#L180

Example: If someone has this page structure:

 pages/account.vue
 pages/account/index.vue

Two routes gets created, without name.

There should be a warning/error in console that prevents routes without name to be handled by nuxt-i18n-micro

s00d commented 1 month ago

https://github.com/s00d/nuxt-i18n-micro/releases/tag/v1.26.2

fixed