I had this beautiful single binary of my Astro SSR site running, but after upgrading to Astro V5 I get attached error.
Here's where this gets interesting. Astro isn't internalizing this dependency, so the dev-server and even running the local server with bun works fine.
But as soon as I compile to a binary it transpiles this replace variable in a wrong way.
// node_modules/html-escaper/esm/index.js
36257 | var replace = "", ca, esca, pe = (m) => esca[m], escape2 = (es) => replace.call(es, ca, pe);
The actual esm/index.js file looks like this
const {replace} = '';
They're fetching the string replace prototype in a creative way, sure. But translating the replace function into "" is wrong and causing this error.
This is hard to reproduce outside of my entire site's code base. But I'm trying...