-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
45 lines (43 loc) · 982 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
45
// @ts-check
import { defineConfig } from 'astro/config';
import netlify from '@astrojs/netlify';
import svelte from '@astrojs/svelte';
import tailwind from '@astrojs/tailwind';
import db from '@astrojs/db';
const corsHeaders = {
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Resource-Policy': 'same-origin'
}
// https://astro.build/config
export default defineConfig({
integrations: [svelte(), tailwind(), db()],
output: 'server',
adapter: netlify(),
vite: {
worker: {
format: 'es',
rollupOptions: {
output: {
entryFileNames: '[name]-[hash].js',
},
},
},
server: {
headers: corsHeaders,
},
preview: {
headers: corsHeaders,
},
// build: {
// rollupOptions: {
// output: {
// entryFileNames: '[name]-[hash].js',
// },
// },
// },
},
security: {
checkOrigin: false
}
});