@aikidosec/firewall
Version:
Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.
21 lines (20 loc) • 657 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUsingTurbopack = isUsingTurbopack;
function isUsingTurbopack() {
if (process.env.TURBOPACK !== undefined || process.argv.includes("--turbo")) {
return true;
}
// Next.js standalone production builds embed the full config in this env var
const standaloneConfig = process.env.__NEXT_PRIVATE_STANDALONE_CONFIG;
if (standaloneConfig) {
try {
const config = JSON.parse(standaloneConfig);
return config.turbopack !== undefined;
}
catch {
return false;
}
}
return false;
}