File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 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' ;
14import { defineConfig } from "astro/config" ;
25import mdx from "@astrojs/mdx" ;
36import { h } from "hastscript" ;
@@ -10,8 +13,21 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
1013import metaTags from "astro-meta-tags" ;
1114import pagefind from "astro-pagefind" ;
1215
16+ const __filename = fileURLToPath ( import . meta. url ) ;
17+ const __dirname = dirname ( __filename ) ; // @type -check enabled!
18+
1319// https://astro.build/config
1420export 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+ } ,
1531 markdown : {
1632 remarkPlugins : [
1733 [
@@ -46,4 +62,7 @@ export default defineConfig({
4662 pagefind ( ) ,
4763 ] ,
4864 output : "static" ,
65+ build : {
66+ minify : true
67+ } ,
4968} ) ;
Original file line number Diff line number Diff line change 33 "compilerOptions" : {
44 "strictNullChecks" : true ,
55 "jsx" : " react-jsx" ,
6- "jsxImportSource" : " react"
6+ "jsxImportSource" : " react" ,
7+ "paths" : {
8+ "$*" : [" src/*" ]
9+ }
710 }
811}
You can’t perform that action at this time.
0 commit comments