remove monkey patch in bundle.ts (#6207)

full context here :
https://transloadit.slack.com/archives/C0FMW9PSB/p1771342759948189

I tested the local bundle it works as expected with the same API and 15%
reduced bundle size.
This commit is contained in:
Prakash 2026-03-09 00:07:53 +05:30 committed by GitHub
parent 47879609c7
commit 29d27726c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 11 deletions

View file

@ -0,0 +1,6 @@
---
"@uppy/transloadit": patch
"uppy": patch
---
remove monkey patch from uppy bundle package

View file

@ -239,6 +239,10 @@ export default class Transloadit<
> extends BasePlugin<Opts<M, B>, M, B, TransloaditState> {
static VERSION = packageJson.version
static COMPANION_URL = COMPANION_URL
static COMPANION_ALLOWED_HOSTS = COMPANION_ALLOWED_HOSTS
#rateLimitedQueue: RateLimitedQueue
client: Client<M, B>

View file

@ -51,15 +51,4 @@ export { default as Webcam } from '@uppy/webcam'
export { default as XHRUpload } from '@uppy/xhr-upload'
export { default as Zoom } from '@uppy/zoom'
// Special hack for Transloadit static exports
import Transloadit, {
COMPANION_ALLOWED_HOSTS,
COMPANION_URL,
} from '@uppy/transloadit'
// @ts-expect-error monkey patching
Transloadit.COMPANION_URL = COMPANION_URL
// @ts-expect-error monkey patching
Transloadit.COMPANION_ALLOWED_HOSTS = COMPANION_ALLOWED_HOSTS
export const locales = {}