feat: add support for static asset caching (#133)

This commit is contained in:
Sylvain Cau
2022-03-16 16:49:47 +01:00
committed by GitHub
parent 8aa1b250b8
commit 6cbcc27646
9 changed files with 93 additions and 20 deletions
+7 -2
View File
@@ -1,7 +1,12 @@
/** @jsx h */
import { h } from "../client_deps.ts";
import { asset, h } from "../client_deps.ts";
export default function Test(props: { message: string }) {
return <p>{props.message}</p>;
return (
<div>
<p>{props.message}</p>
<img src={asset("/image.png")} />
</div>
);
}
+7 -2
View File
@@ -1,7 +1,12 @@
/** @jsx h */
import { h } from "../client_deps.ts";
import { asset, h } from "../client_deps.ts";
export default function StaticPage() {
return <p>This is a static page.</p>;
return (
<div>
<p>This is a static page.</p>
<img src={asset("/image.png")} />
</div>
);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB