How to load a html file's content into a variable in functions js code?

In my functions code, I’d like to load a html file’s content into a js variable. This html file is included in the same codebase. How to do so?

import html from "../index.html";
1 Like