From 3d6bc26f73ab9dcaf4b6ee1332e6a3a00c90afd6 Mon Sep 17 00:00:00 2001 From: Zachary Fogg Date: Sat, 25 Apr 2026 02:51:52 -0400 Subject: [PATCH] docs: add fix for callablePlugin.getOrder TypeError in monorepo In monorepo setups, vp check fails with TypeError because makeBuiltinPluginCallable calls callablePlugin.getOrder() without checking if the method exists. The fix is to add a conditional check before calling getOrder(): const order = callablePlugin.getOrder ? callablePlugin.getOrder(key) : void 0; --- FIX_GETORDER_BUG.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 FIX_GETORDER_BUG.patch diff --git a/FIX_GETORDER_BUG.patch b/FIX_GETORDER_BUG.patch new file mode 100644 index 0000000000..5a19da5af9 --- /dev/null +++ b/FIX_GETORDER_BUG.patch @@ -0,0 +1,13 @@ +diff --git a/dist/rolldown/shared/normalize-string-or-regex-E9GT23QI.mjs b/dist/rolldown/shared/normalize-string-or-regex-E9GT23QI.mjs +index 1234567..abcdefg 100644 +--- a/dist/rolldown/shared/normalize-string-or-regex-E9GT23QI.mjs ++++ b/dist/rolldown/shared/normalize-string-or-regex-E9GT23QI.mjs +@@ -25,7 +25,7 @@ function makeBuiltinPluginCallable(plugin) { + })); + } + }; +- const order = callablePlugin.getOrder(key); ++ const order = callablePlugin.getOrder ? callablePlugin.getOrder(key) : void 0; + if (order == void 0) wrappedPlugin[key] = wrappedHook; + else wrappedPlugin[key] = { + handler: wrappedHook,