Open lna1989 opened 5 months ago
@BobbieGoede Can you give some advice for layers if you have any ideas? 🙏
Hmm I can only find docs about overwriting with a function for app.config.ts
here, I'll look into figuring out a way to allow overwriting locales with a function.
@kazupon @BobbieGoede Oh, I'm sorry, it looks like I really messed up the rewrite functionality in app.config.ts. But in any case, we must have some method not of extending, but of overwriting the configuration described in nuxt.config.ts for i18n.
Under the hood, the functionality uses https://github.com/unjs/c12 And the same approach is used there through specifying the mergeStrategy function, as far as I understand, just like in app.config.ts - https://github.com/unjs/c12/issues/145
Environment
Build Modules: -
Reproduction
https://stackblitz.com/edit/nuxt-starter-cchusa?file=nuxt.config.ts
Describe the bug
I need to remove unnecessary languages that are present in the Layer. To override, Nuxt tells us to use the arrow function. But I get an error: When using the langDir option the locales must be a list of objects if switch:
to
Additional context
No response
Logs