this is your onEmit hook function that gets called,
if the handler associated with it allows a certain result from an onLoad hook to pass through its filter (OnEmitOptions).
if your return value is nullable (null or undefined), then the next matching onEmit hook function will try to mutate the finalized loaded/transformed contents.
if no emit hook returns a non-nullable after all matches have been made,
then the transformed contents from the onTransform hook will be passed to esbuild as is.
this is your
onEmithook function that gets called, if the handler associated with it allows a certain result from anonLoadhook to pass through its filter (OnEmitOptions).if your return value is nullable (
nullorundefined), then the next matchingonEmithook function will try to mutate the finalized loaded/transformed contents. if no emit hook returns a non-nullable after all matches have been made, then the transformed contents from theonTransformhook will be passed to esbuild as is.