添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Runtime config

Defining options using the Nuxt Runtime Config functionality allows them to be runtime-based rather than build-time based, as is the case by default.

Currently, only the config , clientConfig and serverConfig options can be configured using the runtime config.

In the Nuxt configuration file define a publicRuntimeConfig.sentry configuration object with settings that will be applied at runtime. For example:

nuxt.config.js
publicRuntimeConfig: {
  sentry: {
    config: {
      environment: process.env.SENTRY_ENVIRONMENT
    serverConfig: {
      // Any server-specific config
    clientConfig: {
      // Any client-specific config

You can customize the key that is used to access settings from publicRuntimeConfig by setting runtimeConfigKey in the non-runtime options.

This functionality is supported from Nuxt 2.13 and up.