forked from bitdoze/bitdoze-astro-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
40 lines (36 loc) · 1.21 KB
/
astro.config.mjs
File metadata and controls
40 lines (36 loc) · 1.21 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
// @ts-check
import { defineConfig } from 'astro/config';
import tailwindcss from '@tailwindcss/vite';
import mdx from '@astrojs/mdx';
import icon from 'astro-icon';
import sitemap from '@astrojs/sitemap';
import path from 'path';
// https://astro.build/config
export default defineConfig({
// Set the site URL for production
site: 'https://example.com',
// Base path (set to '/' for most sites)
base: '/',
// Configure Vite plugins and server settings
vite: {
plugins: [
tailwindcss() // Reverted to simpler form, configPath removed
],
server: {
fs: {
allow: [
// Allow the project root (default)
'.',
// Allow the src/assets directory to be served directly during development.
// This is needed for cases where assets from src/assets/ are referenced
// by direct string paths (e.g., in Markdown frontmatter processed by pages)
// instead of ESM imports. For example, the image specified in
// 'src/content/about/index.md' and used by 'src/pages/about.astro'.
path.resolve('./src/assets'),
],
},
},
},
// Configure Astro integrations
integrations: [mdx(), icon(), sitemap()]
});