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.