A minimal self-hosted git browser on Rust axum: bare repos rendered as a website with commits, diffs, syntax-highlighted blobs, atom feeds, and clone over HTTPS.
axumdockergitgit-browsergitoxidegixrustself-hosted
1import { resolve } from "path";
2import { defineConfig } from "vite";
3
4// Vite output goes to ../dist; Rust serves it at /static/.
5// Single entry point, no per-page scripts to split.
6export default defineConfig({
7 base: "/static/",
8 publicDir: resolve(__dirname, "static_src/public"),
9 build: {
10 outDir: resolve(__dirname, "../dist"),
11 emptyOutDir: true,
12 manifest: true,
13 rollupOptions: {
14 input: {
15 index: resolve(__dirname, "static_src/index.js"),
16 },
17 output: {
18 entryFileNames: "assets/[name]-[hash].js",
19 chunkFileNames: "assets/[name]-[hash].js",
20 assetFileNames: "assets/[name]-[hash][extname]",
21 },
22 },
23 },
24 css: {
25 preprocessorOptions: {
26 scss: {
27 quietDeps: true,
28 },
29 },
30 },
31});