-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
57 lines (49 loc) · 1.42 KB
/
Copy pathastro.config.mjs
File metadata and controls
57 lines (49 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// @ts-check
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "astro/config";
import path from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
// https://astro.build/config
export default defineConfig({
// Emit flat .html files (e.g. dist/converter.html) rather than directory
// indices (dist/converter/index.html). Combined with trailingSlash: "never"
// this avoids a Netlify edge canonicalization loop: directory indices
// canonicalize to the trailing-slash form, which the netlify.toml rules
// force back to no-slash, producing ERR_TOO_MANY_REDIRECTS on /converter,
// /artifacts, /builder, and /collections.
build: {
format: "file",
},
integrations: [
react(),
sitemap({
changefreq: "weekly",
filter: (page) => !page.includes("?"),
lastmod: new Date(),
priority: 0.7,
}),
],
output: "static",
site: "https://dfirhub.com",
trailingSlash: "never",
vite: {
build: {
rollupOptions: {
external: ["/pagefind/pagefind.js"],
},
},
optimizeDeps: {
include: ["lucide-react", "framer-motion", "cmdk"],
},
plugins: [tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
worker: { format: "es" },
},
});