Static GitHub Issues

[391] Allow nuxt build command to choice config file

prev: Nuxt on IISNode
next: Layout not applied when middleware redirects to a page with different layout

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 :D

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This feature request is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c342">#c342</a>)</em></sub></div>