.html 文件作为文本文件导入,请在导入语句中使用 type: "text" 属性。
./file.html 文件更改时重新加载。.html 文件作为文本文件导入,请在导入语句中使用 type: "text" 属性。
import html from "./file.html" with { type: "text" };
console.log(html); // <!DOCTYPE html><html><head>...
./file.html 文件更改时重新加载。