79436341

Date: 2025-02-13 13:41:42
Score: 1
Natty:
Report link

use NITRO 100% works

// nuxtconfig

export default {
    runtimeConfig: {
        public: {
          YOUR_VAR: 'hello',
    },
  }
}

/// cmd

yarn build

cross-env NITRO_PUBLIC_YOUR_VAR=bye node .output/server/index.mjs

// runtime

console.log(useRuntimeConifg().public.YOUR_VAR) // 'bye'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Anton