-
Notifications
You must be signed in to change notification settings - Fork 1
/
astro.config.mjs
41 lines (39 loc) · 990 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
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import AstroPWA from "@vite-pwa/astro";
import { defineConfig } from "astro/config";
import { loadEnv } from "vite";
import manifest from "./manifest.json";
const { PUBLIC_SITE_URL } = loadEnv(
process.env.PUBLIC_SITE_URL,
process.cwd(),
""
);
// https://astro.build/config
export default defineConfig({
site: PUBLIC_SITE_URL,
integrations: [
react(),
AstroPWA({
disable: import.meta.env.DEV,
manifest,
manifestFilename: "manifest.json",
registerType: "autoUpdate",
}),
sitemap(),
],
prefetch: true,
vite: {
// this is needed because there's issue in vite regarding importing worker files
// https://github.com/vitejs/vite/issues/8427
optimizeDeps: {
exclude: ["@lofik/react"],
},
},
server: {
headers: {
"cross-origin-embedder-policy": "require-corp",
"cross-origin-opener-policy": "same-origin",
},
},
});