Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

build(prepublish): make next build bundler configurable

diegosouzapw7f3dccf6dd06
diff --git a/scripts/prepublish.ts b/scripts/prepublish.ts
index 37a398986b..500c280526 100644
--- a/scripts/prepublish.ts
+++ b/scripts/prepublish.ts
@@ -128,7 +128,9 @@ if (existsSync(APP_DIR)) {
// ── Step 3: Build Next.js ──────────────────────────────────
console.log(" 🏗️ Building Next.js (standalone)...");
-execSync("npx next build", {
+const nextBuildBundlerFlag =
+ process.env.OMNIROUTE_USE_TURBOPACK === "1" ? "--turbopack" : "--webpack";
+execSync(`npx next build ${nextBuildBundlerFlag}`, {
cwd: ROOT,
stdio: "inherit",
env: {