-
Notifications
You must be signed in to change notification settings - Fork 1
/
astro.config.mjs
67 lines (65 loc) · 2.11 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { defineConfig } from 'astro/config';
import tailwind from "@astrojs/tailwind";
import svelte from "@astrojs/svelte";
import react from "@astrojs/react";
import icon from "astro-icon";
import basicSsl from '@vitejs/plugin-basic-ssl';
import metaTags from "astro-meta-tags";
import path from 'path'; // Añade esta línea
import mkcert from 'vite-plugin-mkcert';
// import serviceWorker from "astrojs-service-worker";
import auth from "auth-astro";
// import netlify from '@astrojs/netlify';
import vercel from "@astrojs/vercel/serverless";
import { fileURLToPath } from 'url';
import path from 'path';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
// https://astro.build/config
export default defineConfig({
image: {
domains: [import.meta.env.VITE_IMAGE_DOMAIN]
},
redirects: {
'/home': '/'
},
vite: {
http: {
large_client_headers_buffers: 4096
},
plugins: [basicSsl()],
server: {
https: true
},
plugins: [mkcert({
savePath: './certs',
// save the generated certificate into certs directory
autoUpgrade: true,
// auto upgrade the certificate if it's expired
hosts: ['localhost'] // generate certificate for localhost
})],
resolve: {
alias: {
'@/*': path.resolve(__dirname, './src/*'),
'@/components/*': path.resolve(__dirname, './src/components/*'),
'@/layouts/*': path.resolve(__dirname, './src/layouts/*'),
'@/pages/*': path.resolve(__dirname, './src/pages/*'),
'@/services/*': path.resolve(__dirname, './src/services/*'),
'@/sections/*': path.resolve(__dirname, './src/sections/*'),
'@/consts/*': path.resolve(__dirname, './src/consts/*'),
'@/public/*': path.resolve(__dirname, './public/*'),
'@/styles/*': path.resolve(__dirname, './src/styles/*')
}
}
},
integrations: [tailwind(), svelte(), react(), icon({
include: {
mdi: ["*"],
// (Default) Loads entire Material Design Icon set
bxs: ["*"] // Loads entire bxs set
}
}), metaTags(), auth()
// , serviceWorker()
],
output: "server",
adapter: vercel()
});