fetch('https://cdn.babylonjs.com/babylon.js') .then((res) => { console.log(res) const reader = res.body.getReader() returnnewReadableStream({ start(controller) { // The following function handles each data chunk functionpush() { // "done" is a Boolean and value a "Uint8Array" reader.read().then(({ done, value }) => { // If there is no more data to read if (done) { console.log('done', done) controller.close() return } // Get the data and send it to the browser via the controller controller.enqueue(value) push() }) } push() }, }) }) .then((stream) => newResponse(stream, { headers: { 'Content-Type': 'text/html' } }).text() ) .then((result) => { console.log(result) eval(result) console.log(BABYLON) })