File tree 3 files changed +26
-0
lines changed
3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 2
2
port : 4141
3
3
host : localhost
4
4
domain : https://tokens.twitchio.dev
5
+ build : " eira/dist/html"
5
6
sessions :
6
7
max_age : 604800
7
8
valkey :
Original file line number Diff line number Diff line change 10
10
"preview" : " vite preview"
11
11
},
12
12
"dependencies" : {
13
+ "glob" : " ^11.0.1" ,
13
14
"react" : " ^19.1.0" ,
14
15
"react-dom" : " ^19.1.0" ,
15
16
"wouter" : " ^3.6.0"
16
17
},
17
18
"devDependencies" : {
18
19
"@biomejs/biome" : " 1.9.4" ,
20
+ "@types/node" : " ^22.14.0" ,
19
21
"@types/react" : " ^19.1.0" ,
20
22
"@types/react-dom" : " ^19.1.1" ,
21
23
"@vitejs/plugin-react" : " ^4.3.4" ,
Original file line number Diff line number Diff line change 1
1
import { defineConfig } from 'vite'
2
2
import svgr from "vite-plugin-svgr" ;
3
3
import react from '@vitejs/plugin-react'
4
+ import { globSync } from "glob" ;
5
+ import { fileURLToPath } from 'node:url' ;
6
+
7
+
8
+ function getEntries ( ) : Record < string , string > {
9
+ const entries : Record < string , string > = { }
10
+
11
+ globSync ( "./html/*.html" ) . map ( ( e ) => {
12
+ const match = e . match ( / \\ ( .* ) .h t m l / ) ;
13
+ // @ts -ignore
14
+ const name : string = match [ 1 ] ;
15
+
16
+ entries [ name ] = fileURLToPath ( new URL ( e , import . meta. url ) )
17
+ } ) ;
18
+
19
+ return entries
20
+ }
21
+
4
22
5
23
export default defineConfig ( {
6
24
plugins : [ svgr ( ) , react ( ) ] ,
25
+ build : {
26
+ rollupOptions : {
27
+ input : getEntries ( )
28
+ }
29
+ }
7
30
} )
You can’t perform that action at this time.
0 commit comments