Skip to content

SSR in Cloudflare Workers (TransformStream and ReadableStream) #4287

Closed
@Cherry

Description

@Cherry

This is a follow-up to #4243, which unfortunately has not been resolved yet and I thought I'd surface a new issue to bring attention to this since it was mentioned in today's blog post.

In that issue, a new API pipeToWebWritable was added to use Cloudflare's TransformStream implementation, but unfortunately doesn't seem to be compatible with their implementation. Unfortunately that same commit seemed to remove the older method of passing a ponyfilled ReadableStream into renderToWebStream too, so there's no real way to do this right now without another workaround.

As a side note, the docs still suggest that passing a third option to renderToWebStream is still possible, even though this was removed.

Version

3.2.1

Reproduction link

#4243
https://github.com/Cherry/workers-vue-ssr-example

Steps to reproduce

What is expected?

This API should work as expected and not throw an error. I'd propose that the older beta-7 functionality be restored in renderToWebStream (with passing in a ponyfilled ReadableStream) so this can at least be hacked around for now, or the functionality in pipeToWebWritable tested/extended to support Cloudflare Workers more directly.

What is actually happening?

API throws Error: Failed to get the 'ready' property on 'Writer': the property is not implemented..


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions