Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in #18,
esbuild
fails to bundle this library (and other packages likehypercast-podcore-next
that use this library) due to an issue in the batch dependency. This increases package/deployment sizes considerably.I have forked the Batch repo, implemented the workaround, and published it as a standalone package scoped to my username. Those changes have been pulled into this repo. It should not introduce any breaking changes downstream.
The workaround implemented in my fork of the Batch repo simply changes this:
to this:
You'll notice I now wrap the
var Emitter = require('emitter');
line in a try/catch so that eslint doesn't complain when it sees that thatemitter
package does not exist and cannot resolve it. That is the extent of the changes.If you can think of a better solution than using this forked version of
Batch
, I'm all for it. The main package hasn't been updated since April of 2021 though, so I don't think there's much risk in forking it and falling behind. Previous attempts by others to give it better bundler support have been declined by the maintainer.Closes #18