Skip to main content
To import a .html file in Bun as a text file, use the type: "text" attribute in the import statement.
file.ts
This can also be used with hot module reloading and/or watch mode to force Bun to reload whenever the ./file.html file changes.