Using HTMLRewriter outside worker during build?

Hi everyone,

I am currently using HTMLRewriter in my Cloudflare Pages worker and Cheerio during the build/deployment process.

Is it possible to call HTMLRewriter from a Node.js build script during the deployment so that I don’t have to maintain two implementations?

Right now I only see one option: Deploying a “helper” worker and then calling it from the Node.js build script during subsequent deployments.

Thank you in advance and Happy New Year!

Yes, using lol-html:

GitHub - cloudflare/html-rewriter-wasm: WebAssembly version of HTMLRewriter is a WASM implementation of it used in miniflare.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.