N
Nuxt4w ago
Kilisei

NuxtConfig path option

I have my configs in ./configs/*.config.(ts,js,mjs). Can nuxt do that with a --config or --configPath option? I didn't find anything online. (Thank you for any reply's)
2 Replies
kapa.ai
kapa.ai4w ago
Hi @Kilisei. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I do not have enough information to answer your question specifically about a --config or --configPath option for Nuxt to load configuration files from a custom directory. However, I can provide some relevant information about Nuxt configuration: 1. Nuxt uses a single nuxt.config file as the main configuration source. This file can have extensions .ts, .js, or .mjs according to the documentation (https://nuxt.com/docs/guide/directory-structure/nuxt-config). 2. Nuxt does not support reading external configuration files by default. The framework is designed to use nuxt.config.ts as the single source of truth for configurations as stated in the documentation (https://nuxt.com/docs/getting-started/configuration#external-configuration-files). 3. If you need to organize your configuration, you might consider using the extends option in your nuxt.config.ts to create layers and extend your configuration as described in the layers documentation (https://nuxt.com/docs/getting-started/layers). 4. For runtime configuration and environment variables, Nuxt provides runtimeConfig and app.config.ts options as explained in the configuration documentation (https://nuxt.com/docs/getting-started/configuration#nuxt-configuration). If you need a specific setup for loading multiple configuration files from a custom directory, you might need to create a custom solution or consider using a Nuxt module to extend the default behavior. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4w ago
<@569531317306261515> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Want results from more Discord servers?
Add your server