Nuxt loads configuration from several places and merges. Here is the order: (first has more periority)
- Config overrides by CLI
nuxt.config
(format: CJS/MJS/TS can be also wrapped into an async function).nuxtrc
~/.nuxtrc
In order to automatically inject some configuration without direct modification of nuxt.config
, it is possible to use .nuxtrc
file.
Thanks to super simpler syntax of rc9 this configuration can be injected via a shell script or package itself.
Notice 1: This feature is supported since v2.13.0
Notice 2: modules[]
syntax is supported in a minor update of rc9 (1.1.0). Using progremattic usage and installing latest version is recommended.