Skip to content

Commit 770e071

Browse files
committed
Add route builder frontend
1 parent 9167fe0 commit 770e071

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

config.example.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ server:
22
port: 4141
33
host: localhost
44
domain: https://tokens.twitchio.dev
5+
build: "eira/dist/html"
56
sessions:
67
max_age: 604800
78
valkey:

eira/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13+
"glob": "^11.0.1",
1314
"react": "^19.1.0",
1415
"react-dom": "^19.1.0",
1516
"wouter": "^3.6.0"
1617
},
1718
"devDependencies": {
1819
"@biomejs/biome": "1.9.4",
20+
"@types/node": "^22.14.0",
1921
"@types/react": "^19.1.0",
2022
"@types/react-dom": "^19.1.1",
2123
"@vitejs/plugin-react": "^4.3.4",

eira/vite.config.ts

+23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
11
import { defineConfig } from 'vite'
22
import svgr from "vite-plugin-svgr";
33
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(/\\(.*).html/);
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+
422

523
export default defineConfig({
624
plugins: [svgr(), react()],
25+
build: {
26+
rollupOptions: {
27+
input: getEntries()
28+
}
29+
}
730
})

0 commit comments

Comments
 (0)