-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathastro.config.ts
33 lines (32 loc) · 917 Bytes
/
astro.config.ts
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
import svelte from "@astrojs/svelte";
import { defineConfig } from "astro/config";
import { optimizeCss, optimizeImports } from "carbon-preprocess-svelte";
import pkg from "./package.json" assert { type: "json" };
export default defineConfig({
outDir: "build",
trailingSlash: "never",
integrations: [
svelte({
preprocess: [optimizeImports()],
}),
],
srcDir: "./www",
publicDir: "./www/public",
prefetch: {
defaultStrategy: "viewport",
prefetchAll: true,
},
vite: {
plugins: [optimizeCss()],
optimizeDeps: {
exclude: ["carbon-components-svelte"],
},
define: {
__PKG_NAME: JSON.stringify(pkg.name),
__PKG_VERSION: JSON.stringify(pkg.version),
__PKG_HOMEPAGE: JSON.stringify(pkg.homepage),
__PKG_HLJS_VERSION: JSON.stringify(pkg.dependencies["highlight.js"]),
__TS: JSON.stringify(new Date().toLocaleString()),
},
},
});