-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
astro.config.mjs
42 lines (40 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
42
import { defineConfig } from "astro/config";
import fs from "node:fs";
import sitemap from "@astrojs/sitemap";
import compress from "astro-compress";
import icon from "astro-icon";
const {
homepage: domain
} = JSON.parse(fs.readFileSync("./package.json"));
export default defineConfig({
site: domain,
prefetch: true,
integrations: [
sitemap({
filter: page => (
page !== `${domain}/404.html` &&
page !== `${domain}/404/` &&
page !== `${domain}/404`
)
}),
compress({
HTML: {
collapseWhitespace: true,
conservativeCollapse: true
}
}),
icon()
],
vite: {
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler"
}
}
},
esbuild: {
drop: ["console", "debugger"],
},
},
});