Skip to content

Commit

Permalink
Configuring the vercel adapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
vratskyi committed Feb 29, 2024
1 parent 22f4698 commit ff05601
Show file tree
Hide file tree
Showing 3 changed files with 671 additions and 24 deletions.
42 changes: 26 additions & 16 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,43 @@ import mdx from "@astrojs/mdx";
import compress from "astro-compress";
import tailwind from "@astrojs/tailwind";

import vercel from "@astrojs/vercel/serverless";

// https://astro.build/config
export default defineConfig({
// i18n settings
i18n: {
defaultLocale: "en",
locales: ["en", "ru", {
path: "ru",
codes: ["ru", "ru-RU"]
}],
routing: {
prefixDefaultLocale: true
},
fallback: {
ru: "en"
}
},
output: "hybrid",
i18n: {
defaultLocale: "en",
locales: ["en", "ru", {
path: "ru",
codes: ["ru", "ru-RU"]
}],
routing: {
prefixDefaultLocale: true
},
fallback: {
ru: "en"
}
},
integrations: [mdx(), compress({
CSS: true,
HTML: false,
Image: true,
JavaScript: true,
SVG: false
}), tailwind()],
site: 'http://localhost:4321',
// site: 'http://localhost:4321',
prefetch: {
prefetchAll: true,
defaultStrategy: 'viewport'
}
},
output: "hybrid",
adapter: vercel({
isr: {
expiration: 60 * 60 * 24,
},
webAnalytics: {
enabled: true,
},
})
});
Loading

0 comments on commit ff05601

Please sign in to comment.