This opens up new possibilities, which McFly should support.
Currently we only assemble the HTML response on each route request, putting things on the HTML head as needed. For example, when we see WebComponent base class is used, we insert an import from unpkg CDN.
In this issue, we support writing to client asset files with unstorage's useStorage then build & insert import maps in the document head.
[ ] use unstorage to write client asset files
[ ] dynamically build & insert import maps
[ ] let's hash those file names
[ ] update WebComponent auto import
[ ] (optional) allow imports on component files; this could be bigger and out of scope
[ ] bundle / resolve imports so components are self-contained
This opens up new possibilities, which McFly should support.
Currently we only assemble the HTML response on each route request, putting things on the HTML head as needed. For example, when we see
WebComponent
base class is used, we insert an import from unpkg CDN.In this issue, we support writing to client asset files with unstorage's
useStorage
then build & insert import maps in the documenthead
.WebComponent
auto import