mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
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:
parent
47879609c7
commit
29d27726c8
3 changed files with 10 additions and 11 deletions
6
.changeset/silly-parrots-knock.md
Normal file
6
.changeset/silly-parrots-knock.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
"@uppy/transloadit": patch
|
||||||
|
"uppy": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
remove monkey patch from uppy bundle package
|
||||||
|
|
@ -239,6 +239,10 @@ export default class Transloadit<
|
||||||
> extends BasePlugin<Opts<M, B>, M, B, TransloaditState> {
|
> extends BasePlugin<Opts<M, B>, M, B, TransloaditState> {
|
||||||
static VERSION = packageJson.version
|
static VERSION = packageJson.version
|
||||||
|
|
||||||
|
static COMPANION_URL = COMPANION_URL
|
||||||
|
|
||||||
|
static COMPANION_ALLOWED_HOSTS = COMPANION_ALLOWED_HOSTS
|
||||||
|
|
||||||
#rateLimitedQueue: RateLimitedQueue
|
#rateLimitedQueue: RateLimitedQueue
|
||||||
|
|
||||||
client: Client<M, B>
|
client: Client<M, B>
|
||||||
|
|
|
||||||
|
|
@ -51,15 +51,4 @@ export { default as Webcam } from '@uppy/webcam'
|
||||||
export { default as XHRUpload } from '@uppy/xhr-upload'
|
export { default as XHRUpload } from '@uppy/xhr-upload'
|
||||||
export { default as Zoom } from '@uppy/zoom'
|
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 = {}
|
export const locales = {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue