tldraw/apps/dotcom/setupTests.js
alex cbac3ad3d0
introduce images.tldraw.xyz image optimisation worker (#4069)
Fixes asset loading/processing on staging/previews by introducing a new
image processing worker. This worker acts as a proxy for our various
image hosts and resizes/optimizes/caches images on the fly. Like the old
bookmark worker, this one is deployed in an ad-hoc fashion as it works
across environments and we're not likely to change it often.

### Change type

- [x] `other`
2024-07-08 16:25:53 +00:00

9 lines
361 B
JavaScript

global.crypto ??= new (require('@peculiar/webcrypto').Crypto)()
process.env.MULTIPLAYER_SERVER = 'https://localhost:8787'
process.env.ASSET_UPLOAD = 'https://localhost:8788'
process.env.IMAGE_WORKER = 'https://images.tldraw.xyz'
process.env.TLDRAW_ENV = 'test'
global.TextEncoder = require('util').TextEncoder
global.TextDecoder = require('util').TextDecoder