aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ZigGlobalObject.cpp
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-04-24 14:11:59 -0700
committerGravatar GitHub <noreply@github.com> 2023-04-24 14:11:59 -0700
commit923ac39c0b718ac5d488f65232f0dcd7161423d4 (patch)
treec4a35c8e7c8f16a5139a4622b8a26ff2331f85b6 /src/bun.js/bindings/ZigGlobalObject.cpp
parent98209b8e101c8c0199f1360f7c1781938f502ed8 (diff)
downloadbun-923ac39c0b718ac5d488f65232f0dcd7161423d4.tar.gz
bun-923ac39c0b718ac5d488f65232f0dcd7161423d4.tar.zst
bun-923ac39c0b718ac5d488f65232f0dcd7161423d4.zip
Support plugins in `Bun.build` (#2720)
* wip * Implement `onLoad` plugins * Support exceptions and async `onLoad` plugins * Fix filtering * Handle empty files * Fix JSON loader --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp')
-rw-r--r--src/bun.js/bindings/ZigGlobalObject.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp
index b969acf4c..a00d49343 100644
--- a/src/bun.js/bindings/ZigGlobalObject.cpp
+++ b/src/bun.js/bindings/ZigGlobalObject.cpp
@@ -3944,6 +3944,10 @@ GlobalObject::PromiseFunctions GlobalObject::promiseHandlerID(EncodedJSValue (*h
return GlobalObject::PromiseFunctions::Bun__TestScope__onReject;
} else if (handler == Bun__TestScope__onResolve) {
return GlobalObject::PromiseFunctions::Bun__TestScope__onResolve;
+ } else if (handler == jsFunctionOnLoadObjectResultRejectForJSBundlerPlugin) {
+ return GlobalObject::PromiseFunctions::jsFunctionOnLoadObjectResultResolveForJSBundlerPlugin;
+ } else if (handler == jsFunctionOnLoadObjectResultResolveForJSBundlerPlugin) {
+ return GlobalObject::PromiseFunctions::jsFunctionOnLoadObjectResultRejectForJSBundlerPlugin;
} else if (handler == CallbackJob__onResolve) {
return GlobalObject::PromiseFunctions::CallbackJob__onResolve;
} else if (handler == CallbackJob__onReject) {