UNPKG

@next/font

Version:

`@next/font` includes built-in automatic self-hosting for any font file. This means you can optimally load web fonts with zero layout shift, thanks to the underlying CSS size-adjust property used.

25 lines (24 loc) 946 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getProxyAgent = void 0; // @ts-ignore const https_proxy_agent_1 = __importDefault(require("next/dist/compiled/https-proxy-agent")); // @ts-ignore const http_proxy_agent_1 = __importDefault(require("next/dist/compiled/http-proxy-agent")); /** * If the http(s)_proxy environment variables is set, return a proxy agent. */ function getProxyAgent() { const httpsProxy = process.env['https_proxy'] || process.env['HTTPS_PROXY']; if (httpsProxy) { return new https_proxy_agent_1.default(httpsProxy); } const httpProxy = process.env['http_proxy'] || process.env['HTTP_PROXY']; if (httpProxy) { return new http_proxy_agent_1.default(httpProxy); } } exports.getProxyAgent = getProxyAgent;