esbuild-plugin-html-modules

JSON →
library 0.9.1 ·javascript
verified May 1, 2026

An esbuild plugin that enables loading HTML files as ES modules, following the WICG HTML Modules proposal. Version 0.9.1 allows importing HTML files with `import` statements, where the HTML template becomes the default export and `<script type="module">` code runs as the module script. Supports configuration for global CSS extraction, local style transformation via PostCSS, and custom file filters. Key differentiator: enables web component authors to co-locate templates, scripts, and styles in single HTML files with standard ES module semantics. Released weekly, actively maintained.

total hits 10
actors 3 distinct systems
last hit 4d ago AhrefsBot
MetaBot
3
GPTBot
2
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom