forked from frontendmu/frontend.mu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
44 lines (40 loc) · 1022 Bytes
/
astro.config.mjs
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
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import image from "@astrojs/image";
import Icons from 'unplugin-icons/vite'
import vue from "@astrojs/vue";
let site = "https://frontend.mu";
// https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables
if (process.env.VERCEL_ENV === "preview" || process.env.VERCEL_ENV === "development") {
site = `https://${process.env.VERCEL_URL}`;
}
// https://astro.build/config
export default defineConfig({
site,
integrations: [
mdx(),
sitemap(),
vue(),
image({
serviceEntryPoint: "@astrojs/image/sharp",
}),
],
vite: {
resolve: { dedupe: ["vue"] },
define: {
"import.meta.env.VERCEL_ANALYTICS_ID": JSON.stringify(
process.env.VERCEL_ANALYTICS_ID
),
},
plugins: [
Icons({
compiler: 'vue3',
autoInstall: true
}),
],
},
experimental: {
viewTransitions: true
}
});