Files

108 lines
3.1 KiB
TypeScript
Raw Permalink Normal View History

2025-09-27 15:51:46 -05:00
import react from "@astrojs/react";
import { wrapper } from "@blitzkit/i18n";
import locales from "@blitzkit/i18n/locales.json";
2025-09-27 15:38:37 -05:00
import strings from "@blitzkit/i18n/strings/en.json";
2025-09-27 15:51:46 -05:00
import { mauve, mauveDark } from "@radix-ui/colors";
2025-09-27 15:38:37 -05:00
import AstroPWA from "@vite-pwa/astro";
import favicons from "astro-favicons";
import { defineConfig } from "astro/config";
2025-09-27 15:51:46 -05:00
import packageJSON from "../../package.json";
2025-09-27 15:38:37 -05:00
import { tools } from "./src/constants/tools";
export default defineConfig({
devToolbar: { enabled: false },
2026-08-01 14:32:25 -05:00
vite: {
server: { allowedHosts: [] },
esbuild: { target: "es2022" },
},
2026-08-05 13:22:33 -05:00
output: "static",
2025-09-27 18:32:18 -05:00
site: "https://blitzkit.app",
outDir: "../../dist/website",
2025-09-29 13:30:10 -05:00
prefetch: { defaultStrategy: "hover", prefetchAll: true },
2025-09-27 18:37:51 -05:00
build: { concurrency: 4 },
2025-09-27 17:05:06 -05:00
2025-09-27 15:38:37 -05:00
integrations: [
favicons({
name: strings.common.name,
short_name: strings.common.name,
background: mauveDark.mauve1,
themes: [mauve.mauve1, mauveDark.mauve1],
appleStatusBarStyle: "black-translucent",
2025-09-27 15:51:46 -05:00
version: packageJSON.version,
2025-09-27 15:38:37 -05:00
shortcuts: Object.values(tools)
.filter((tool) => !tool.disabled && !tool.href)
.map((tool) => {
const stringId = (tool.strings ??
tool.id) as keyof typeof strings.website.tools;
return {
name: strings.website.tools[stringId].name,
name_localized: wrapper(
2026-08-01 14:32:25 -05:00
(strings) => strings.website.tools[stringId].name,
2025-09-27 15:38:37 -05:00
),
description: strings.website.tools[stringId].description,
description_localized: wrapper(
2026-08-01 14:32:25 -05:00
(strings) => strings.website.tools[stringId].description,
2025-09-27 15:38:37 -05:00
),
short_name: strings.website.tools[stringId].name,
short_name_localized: wrapper(
2026-08-01 14:32:25 -05:00
(strings) => strings.website.tools[stringId].name,
2025-09-27 15:38:37 -05:00
),
url: `/${tool.id}`,
2025-09-27 18:26:37 -05:00
icon: `public/assets/images/tools/${tool.id}.webp`,
2025-09-27 15:38:37 -05:00
};
}),
manifest: {
2025-09-27 15:51:46 -05:00
description: strings.website.home.seo_description,
description_localized: wrapper(
2026-08-01 14:32:25 -05:00
(strings) => strings.website.home.seo_description,
2025-09-27 15:51:46 -05:00
),
dir: "ltr",
categories: ["utilities", "games", "developer", "developer tools"],
id: "com.tresabhi.blitzkit",
2025-09-27 15:38:37 -05:00
start_url: "/",
2025-09-27 15:51:46 -05:00
launch_handler: { client_mode: "navigate-new" },
2025-09-27 15:38:37 -05:00
display: "fullscreen",
display_override: ["fullscreen", "standalone", "minimal-ui"],
2025-09-27 15:51:46 -05:00
lang: locales.default,
orientation: "any",
2025-09-27 15:38:37 -05:00
},
icons: {
windows: true,
android: true,
appleIcon: true,
appleStartup: true,
favicons: true,
yandex: true,
},
}),
2025-09-27 19:13:29 -05:00
AstroPWA({
manifest: false,
devOptions: { enabled: true },
workbox: {
globPatterns: ["**/*.{html,css,js,png,webp,svg,xml,json}"],
runtimeCaching: [
{
urlPattern: ({ url }) =>
url.href.startsWith(import.meta.env.PUBLIC_ASSET_BASE),
handler: "NetworkFirst",
},
],
},
}),
2025-09-27 15:38:37 -05:00
react(),
],
});