Api
Nuxt Config
Configure Nuxt Scripts using your Nuxt Config.
registry
- Type:
ScriptRegistry
Global registry scripts that should be loaded.
See the Script Registry for more details.
defaultScriptOptions
- Type:
NuxtUseScriptOptions
- Default:
{ trigger: 'onNuxtReady' }
Default options for scripts. See the useScript documentation for more details.
globals
- Type:
(NuxtUseScriptInput | [NuxtUseScriptInput, NuxtUseScriptOptions])[]
- Default:
[]
Global scripts that should be loaded on all pages. This is a configuration for the useScript composable.
See the Globals documentation for more details.
assets
- Type:
object
- Default:
{ prefix: '/_scripts/', strategy: 'public' }
Controls the way scripts are bundled to be served by Nuxt.
See the Bundling documentation for more details.
enabled
- Type:
boolean
- Default:
true
Disables the Nuxt Scripts module.
debug
- Type:
boolean
- Default:
false
Enable to see debug logs.
fallbackOnSrcOnBundleFail
- Type:
boolean
- Default:
false
Fallback to the remote src URL when bundle
fails when enabled. By default, the bundling process stops if the third-party script can't be downloaded.