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

fix(build): add webpack IgnorePlugin for thread-stream test files; exclude compiled app/ dir from git

diegosouzapwe003b1728063
diff --git a/.gitignore b/.gitignore
index 032f735e3a..326d5d2227 100644
--- a/.gitignore
+++ b/.gitignore
@@ -131,3 +131,6 @@ vscode-extension/
*.sqlite-shm
*.sqlite-wal
*.sqlite-journal
+
+# Compiled npm-package build artifact (not source, should not be in git)
+/app
diff --git a/next.config.mjs b/next.config.mjs
index a3a7251c71..cc3060afdc 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -13,6 +13,7 @@ const nextConfig = {
},
output: "standalone",
serverExternalPackages: [
+ "thread-stream",
"better-sqlite3",
"zod",
"child_process",
@@ -37,8 +38,16 @@ const nextConfig = {
images: {
unoptimized: true,
},
- webpack: (config, { isServer }) => {
+ webpack: (config, { isServer, webpack }) => {
if (isServer) {
+ // Webpack IgnorePlugin: skip thread-stream test files that contain
+ // intentionally broken syntax/imports (they cause Turbopack build errors)
+ config.plugins.push(
+ new webpack.IgnorePlugin({
+ resourceRegExp: /\/test\//,
+ contextRegExp: /thread-stream/,
+ })
+ );
// ── Turbopack / Next.js 16 module-hash patch (#394, #396, #398) ────────
//
// Next.js 16 (with or without Turbopack) compiles the instrumentation hook