import { load } from "cheerio" ; export const SELECTOR = "script#app-config" ; export default function configureHtml ( html , configurationScriptContent ) { const $ = load ( html . toString ( ) ) ; $ ( SELECTOR ) . removeAttr ( "src" ) . html ( configurationScriptContent ) ; const configuredHtml = $ . html ( ) ; return Buffer . from ( configuredHtml ) ; }