Skip to content

Commit ff05601

Browse files
committed
Configuring the vercel adapter.
1 parent 22f4698 commit ff05601

File tree

3 files changed

+671
-24
lines changed

3 files changed

+671
-24
lines changed

astro.config.mjs

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,43 @@ import mdx from "@astrojs/mdx";
33
import compress from "astro-compress";
44
import tailwind from "@astrojs/tailwind";
55

6+
import vercel from "@astrojs/vercel/serverless";
7+
68
// https://astro.build/config
79
export default defineConfig({
810
// i18n settings
9-
i18n: {
10-
defaultLocale: "en",
11-
locales: ["en", "ru", {
12-
path: "ru",
13-
codes: ["ru", "ru-RU"]
14-
}],
15-
routing: {
16-
prefixDefaultLocale: true
17-
},
18-
fallback: {
19-
ru: "en"
20-
}
21-
},
22-
output: "hybrid",
11+
i18n: {
12+
defaultLocale: "en",
13+
locales: ["en", "ru", {
14+
path: "ru",
15+
codes: ["ru", "ru-RU"]
16+
}],
17+
routing: {
18+
prefixDefaultLocale: true
19+
},
20+
fallback: {
21+
ru: "en"
22+
}
23+
},
2324
integrations: [mdx(), compress({
2425
CSS: true,
2526
HTML: false,
2627
Image: true,
2728
JavaScript: true,
2829
SVG: false
2930
}), tailwind()],
30-
site: 'http://localhost:4321',
31+
// site: 'http://localhost:4321',
3132
prefetch: {
3233
prefetchAll: true,
3334
defaultStrategy: 'viewport'
34-
}
35+
},
36+
output: "hybrid",
37+
adapter: vercel({
38+
isr: {
39+
expiration: 60 * 60 * 24,
40+
},
41+
webAnalytics: {
42+
enabled: true,
43+
},
44+
})
3545
});

0 commit comments

Comments
 (0)