"inlining" 在 Next.js "env" 文档中是什么意思?
What is "inlining" means in Next.js "env" document?
我正在 Next.js 中的静态构建文件中搜索 'env' 概念,但无法理解在此上下文中“内联”的含义。谁能给我更具体的例子?
This loads process.env.NEXT_PUBLIC_ANALYTICS_ID into the Node.js environment automatically, allowing you to use it anywhere in your code. The value will be inlined into JavaScript sent to the browser because of the NEXT_PUBLIC_ prefix. This inlining occurs at build time, so your various NEXT_PUBLIC_ envs need to be set when the project is built.
这意味着当构建工具生成要发送给浏览器的源代码时,它会将读取环境变量的指令替换为表示构建发生时该环境变量值的字符串。
我正在 Next.js 中的静态构建文件中搜索 'env' 概念,但无法理解在此上下文中“内联”的含义。谁能给我更具体的例子?
This loads process.env.NEXT_PUBLIC_ANALYTICS_ID into the Node.js environment automatically, allowing you to use it anywhere in your code. The value will be inlined into JavaScript sent to the browser because of the NEXT_PUBLIC_ prefix. This inlining occurs at build time, so your various NEXT_PUBLIC_ envs need to be set when the project is built.
这意味着当构建工具生成要发送给浏览器的源代码时,它会将读取环境变量的指令替换为表示构建发生时该环境变量值的字符串。