Home

Issue: 391

Allow nuxt build command to choice config file

[issue link]

Hi,

The nuxt.config.js file path is written in the code of the nuxt build command. But the problem is that this file is not always located at root directory, and it can be cool to allow developers to choice the path of this configuration file.

For example:

.
+-- config
|   +-- general.config.js
|   +-- nuxt.config.js
|   +-- api.config.js
|   +-- styles.config.js
+-- pages
|   +-- index.vue
+-- layouts
|   +-- default.vue
|   +-- post.vue
+-- store
|   +-- index.js
...

I want to use

$ nuxt build -c /path/to/project/config/nuxt.config.js /path/to/project
$ # or 
$ nuxt build --config-file /path/to/project/config/nuxt.config.js /path/to/project

Can be useful to automatize deployments 😄

This feature request is available on Nuxt.js community (#c342)