hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

HTMLRewriter is not implemented in development

Open frandiox opened this issue 3 years ago • 2 comments

HTMLRewriter is a proprietary API available in Oxygen and CFW. We should polyfill this API in the Node.js development server to have parity with Oxygen.

The rewriter can be useful for incremental adoption of Hydrogen as mentioned here.

About the implementation, we can just get it from Miniflare since it's exported as a module 🎉 -- It looks like Miniflare uses undici internally for the Response constructor so it would be better if we migrate to undici from node-fetch first.

frandiox avatar Jun 28 '22 07:06 frandiox

Would this be more of an enhancement than bug?

blittle avatar Jul 01 '22 16:07 blittle

Frankly I feel like this should be something we don't do, if incremental adoption is the only use case. There are more things that we need to do beyond what Scott's example shows to make that flow seamless, and I think this is going to require Oxygen in other ways.

I would be comfortable leaving this as a progressive enhancement for Oxygen (& CFW).

benjaminsehl avatar Jul 27 '22 23:07 benjaminsehl

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset. If the changes are user-facing and should cause a version bump, run npm run changeset add to track your changes and include them in the next release CHANGELOG. If you are making simple updates to examples or documentation, you do not need to add a changeset.

github-actions[bot] avatar Feb 15 '24 23:02 github-actions[bot]