-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
44 lines (39 loc) · 1.1 KB
/
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
43
44
import {defineConfig} from 'astro/config';
import solidJs from "@astrojs/solid-js";
import {resolve} from "path";
import {fileURLToPath} from 'url';
import {dirname} from 'path';
import {ViteUserConfig} from "astro";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// https://astro.build/config
export default defineConfig({
integrations: [solidJs(), integratePaths({
// For paths integration
// resolve: {
// alias: {
// "@org/lib": resolve(__dirname, "./packages/lib/src")
// }
// }
})],
// Your base path
base: '/',
output : "static",
build : {
// use assets dir name if you are deploying to GitHub pages
// which eliminates directory names like _astro
assets : "assets"
}
});
function integratePaths(config) {
return {
name: 'anique-solid-vite-config',
hooks: {
'astro:config:setup': ({updateConfig}) => {
updateConfig({
vite: config,
});
},
},
};
}