/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
test/e2e/define/app/client-component.js
38 строк
692 B
Andrew Imm
Compiler: Support boolean and number primtives in next.config defines (#92731)
13 апр 2026, 22:00
Не верифицирован
13 апр 2026, 22:00
efc0905
Код
Авторство
О чём код?
/* eslint-disable no-undef */ 'use client' export function ClientValue() { return ( <>{typeof MY_MAGIC_VARIABLE === 'string' ? MY_MAGIC_VARIABLE : 'not set'}</> ) } export function ClientExpr() { return ( <> {typeof process.env.MY_MAGIC_EXPR === 'string' ? process.env.MY_MAGIC_EXPR : 'not set'} </> ) } export function ClientNumber() { return ( <> {typeof MY_NUMBER_VARIABLE === 'number' ? String(MY_NUMBER_VARIABLE) : 'not set'} </> ) } export function ClientBoolean() { return ( <> {typeof MY_BOOLEAN_VARIABLE === 'boolean' ? String(MY_BOOLEAN_VARIABLE) : 'not set'} </> ) }