-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathastro.config.mts
More file actions
43 lines (41 loc) · 1.18 KB
/
astro.config.mts
File metadata and controls
43 lines (41 loc) · 1.18 KB
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
import { defineConfig } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import preact from '@astrojs/preact';
import { remarkTranscriptPlugin } from "./src/remark-transcript-plugin/plugin";
import { remarkResponsiveImages } from './src/plugins/remark-responsive-images';
import { remarkLinksExtractor } from './src/plugins/remark-links-extractor';
// https://astro.build/config
export default defineConfig({
publicDir: "public",
integrations: [preact({ compat: true })],
vite: {
plugins: [tailwindcss() as never],
build: {
rollupOptions: {
external: ['/pagefind/pagefind.js'],
},
},
optimizeDeps: {
exclude: ['/pagefind/pagefind.js'],
},
},
markdown: {
remarkPlugins: [remarkLinksExtractor, remarkTranscriptPlugin, remarkResponsiveImages],
},
experimental: {
chromeDevtoolsWorkspace: true,
},
image: {
responsiveStyles: true,
layout: 'constrained',
// Reasonable default widths for responsive images
service: {
entrypoint: 'astro/assets/services/sharp',
config: {
quality: 90,
formats: ['webp'],
widths: [640, 750, 828, 1080, 1200, 1920],
},
},
},
});