Skip to content

Commit 73956cd

Browse files
authored
Merge branch 'ep2025' into ep2025-cleanup3
2 parents d279393 + 25bd092 commit 73956cd

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

astro.config.mjs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
99
import metaTags from "astro-meta-tags";
1010
import pagefind from "astro-pagefind";
1111
import deleteUnusedImages from "astro-delete-unused-images";
12-
import preload from "astro-preload";
1312
import { execSync } from "node:child_process";
13+
import compress from "astro-compress";
1414

1515
let gitVersion = String(process.env.GIT_VERSION ?? "").slice(0, 7);
1616

@@ -26,6 +26,28 @@ if (!gitVersion) {
2626
}
2727
}
2828

29+
function dontDie() {
30+
return {
31+
name: "dont-die",
32+
hooks: {
33+
"astro:config:setup": () => {
34+
process.on("uncaughtException", (error) => {
35+
if (
36+
error.message &&
37+
error.message.includes("Failed to load remote image")
38+
) {
39+
console.warn(
40+
"[dont-die] Caught remote image error:",
41+
error.message
42+
);
43+
return;
44+
}
45+
});
46+
},
47+
},
48+
};
49+
}
50+
2951
// https://astro.build/config
3052
export default defineConfig({
3153
vite: {
@@ -79,7 +101,6 @@ export default defineConfig({
79101
"/speaker/savannah-ostrowski": "/speaker/savannah-bailey",
80102
},
81103
integrations: [
82-
preload(),
83104
mdx(),
84105
sitemap(),
85106
tailwind({
@@ -88,9 +109,10 @@ export default defineConfig({
88109
metaTags(),
89110
pagefind(),
90111
deleteUnusedImages(),
91-
(await import("astro-compress")).default({
112+
compress({
92113
SVG: false,
93114
}),
115+
dontDie(),
94116
],
95117
output: "static",
96118
build: {

public/assets/preloaded/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)