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
Hi @PierreRambaud
I'd love to see a PR for that 👍
@Atinux Dunno if adding and equivalent of argparse can be a good idea but I can have a look to add this for the future of this project. (NuxtJs and VuejS make me like Javascript o/)
You don't need argparse, take a look at this: https://github.com/nuxt/nuxt.js/blob/master/bin/nuxt-build#L11
Yes, that's what I did for the PR :)
Thanks for merge @Atinux ;)
This issue maybe should be closed and add to Milestone 0.10 ?
I will close it when the 0.10 will be out @PierreRambaud
The 0.10 release it out ✋
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@Atinux Dunno if adding and equivalent of argparse can be a good idea but I can have a look to add this for the future of this project. (NuxtJs and VuejS make me like Javascript o/)