#12851 86a40f0 Thanks @jamesopstad! - Fix a bug that prevented using subpath imports for additional module types
You can now use subpath imports for additional module types (.html, .txt, .sql, .bin, .wasm) by defining them in your package.json imports field:
// package.json
{
"imports": {
"#templates/page": "./src/templates/page.html"
}
}
import page from "#templates/page";
export default {
fetch() {
return new Response(page, {
headers: { "Content-Type": "text/html" },
});
},
} satisfies ExportedHandler;
Updated dependencies [593c4db, b8f3309, 451dae3, 5aaaab2, 5aaaab2, f8516dd, 9c9fe30, 379f2a2, c2e9163, 6a6449e, 9a1cf29, 875da60]:
Fetched March 26, 2026