Refactor as SSG using Vite+React

This commit is contained in:
Michael Bradley 2025-01-03 00:50:52 +13:00
parent a22071815d
commit 6830bd41dd
Signed by: MichaelBradley
SSH key fingerprint: SHA256:cj/YZ5VT+QOKncqSkx+ibKTIn0Obg7OIzwzl9BL8EO8
25 changed files with 3076 additions and 282 deletions

34
src/vite-env.d.ts vendored Normal file
View file

@ -0,0 +1,34 @@
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />
// Imagetools types inspired by: https://github.com/JonasKruckenberg/imagetools/issues/160
// These only work for my specific imports
declare module "*as=metadata" {
interface Metadata {
src: string;
width: number;
height: number;
format: string;
}
const output: Metadata;
export default output;
}
declare module "*as=picture" {
type Primaries = {
avif: string;
// jxl: string; // Broken right now
webp: string;
};
type Fallback = {
src: string;
w: number;
h: number;
};
type Picture = {
sources: Primaries;
img: Fallback;
};
const output: Picture;
export default output;
}