fix(deps): 补丁绕过 @tanstack/start-plugin-core 误引 @rsbuild/core

@tanstack/start-plugin-core@1.168.0 的 dist/esm/index.js 在 Vite 场景
下也会静态导入 ./rsbuild/planning.js,而后者硬依赖被标为 optional peer
的 @rsbuild/core,导致 vite build 启动阶段 ERR_MODULE_NOT_FOUND。

引入 bun patch 只保留 vite 相关导出(删掉 RSBUILD_ENVIRONMENT_NAMES
和 tanStackStartRsbuild),不安装 rsbuild 全家桶(rspack 很重)。
等上游修复再移除本补丁。
This commit is contained in:
2026-04-24 20:35:22 +08:00
parent 19e60d358f
commit f6b6edee23
3 changed files with 18 additions and 0 deletions
+3
View File
@@ -42,6 +42,9 @@
}, },
}, },
}, },
"patchedDependencies": {
"@tanstack/start-plugin-core@1.168.0": "patches/@tanstack%2Fstart-plugin-core@1.168.0.patch",
},
"packages": { "packages": {
"@babel/code-frame": ["@babel/code-frame@7.29.0", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="], "@babel/code-frame": ["@babel/code-frame@7.29.0", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="],
+3
View File
@@ -58,5 +58,8 @@
"tailwindcss": "^4.2.4", "tailwindcss": "^4.2.4",
"typescript": "^6.0.3", "typescript": "^6.0.3",
"vite": "^8.0.10" "vite": "^8.0.10"
},
"patchedDependencies": {
"@tanstack/start-plugin-core@1.168.0": "patches/@tanstack%2Fstart-plugin-core@1.168.0.patch"
} }
} }
@@ -0,0 +1,12 @@
diff --git a/dist/esm/index.js b/dist/esm/index.js
index 5a5e23586d76ffac58ca95cafa46759d39be68d0..32db5e8d38c11bb430326ed6c1b4fd9a944b49f2 100644
--- a/dist/esm/index.js
+++ b/dist/esm/index.js
@@ -1,6 +1,4 @@
import { START_ENVIRONMENT_NAMES, VITE_ENVIRONMENT_NAMES } from "./constants.js";
import { createVirtualModule } from "./vite/createVirtualModule.js";
import { tanStackStartVite } from "./vite/plugin.js";
-import { RSBUILD_ENVIRONMENT_NAMES } from "./rsbuild/planning.js";
-import { tanStackStartRsbuild } from "./rsbuild/plugin.js";
-export { RSBUILD_ENVIRONMENT_NAMES, START_ENVIRONMENT_NAMES, VITE_ENVIRONMENT_NAMES, createVirtualModule, tanStackStartRsbuild, tanStackStartVite };
+export { START_ENVIRONMENT_NAMES, VITE_ENVIRONMENT_NAMES, createVirtualModule, tanStackStartVite };