File tree 2 files changed +23
-1
lines changed
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change
1
+
2
+ import path , { dirname } from 'path' ;
3
+ import { fileURLToPath } from 'url' ;
1
4
import { defineConfig } from "astro/config" ;
2
5
import mdx from "@astrojs/mdx" ;
3
6
import { h } from "hastscript" ;
@@ -10,8 +13,21 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
10
13
import metaTags from "astro-meta-tags" ;
11
14
import pagefind from "astro-pagefind" ;
12
15
16
+ const __filename = fileURLToPath ( import . meta. url ) ;
17
+ const __dirname = dirname ( __filename ) ; // @type -check enabled!
18
+
13
19
// https://astro.build/config
14
20
export default defineConfig ( {
21
+ vite : {
22
+ define : {
23
+ 'process.env.VITE_BUILD_TIME' : JSON . stringify ( new Date ( ) . toISOString ( ) ) ,
24
+ } ,
25
+ resolve : {
26
+ alias : {
27
+ '$' : path . resolve ( __dirname , './src' )
28
+ }
29
+ } ,
30
+ } ,
15
31
markdown : {
16
32
remarkPlugins : [
17
33
[
@@ -46,4 +62,7 @@ export default defineConfig({
46
62
pagefind ( ) ,
47
63
] ,
48
64
output : "static" ,
65
+ build : {
66
+ minify : true
67
+ } ,
49
68
} ) ;
Original file line number Diff line number Diff line change 3
3
"compilerOptions" : {
4
4
"strictNullChecks" : true ,
5
5
"jsx" : " react-jsx" ,
6
- "jsxImportSource" : " react"
6
+ "jsxImportSource" : " react" ,
7
+ "paths" : {
8
+ "$*" : [" src/*" ]
9
+ }
7
10
}
8
11
}
You can’t perform that action at this time.
0 commit comments