diff --git a/astro/astro.config.mjs b/astro/astro.config.mjs index f0f559c..b41d650 100644 --- a/astro/astro.config.mjs +++ b/astro/astro.config.mjs @@ -4,6 +4,7 @@ import preact from "@astrojs/preact"; import tailwindcss from "@tailwindcss/vite"; import graphql from "@rollup/plugin-graphql"; import playformCompress from "@playform/compress"; +import { getFiles } from "./src/build/files.ts"; // https://astro.build/config export default defineConfig({ @@ -13,7 +14,14 @@ export default defineConfig({ JSON: true, JavaScript: false, HTML: true - })], + }), { + name: "download-files", + hooks: { + "astro:build:start": async ({ }) => { + await getFiles(); + } + } + }], output: "static", prefetch: true, build: { diff --git a/astro/src/build/files.ts b/astro/src/build/files.ts index 2393d6d..c0f650d 100644 --- a/astro/src/build/files.ts +++ b/astro/src/build/files.ts @@ -1 +1,3 @@ // This file gets files, and puts them in the public folder before starting the build. +export async function getFiles() { +}