Files
ahriman/frontend/vite.config.ts
T
arcanis 700893ecac build: subpackages implementation (#164)
* migrate to hatch

* reorder tests

* generic fixtures

* straight forward conftest

* fix docs generation

* fix tox environments

* reformat tomls

* cleanup pyproject

* some play with renaming

* move root conftest into pytest plugins

* fix setup script

* move fixtures to __init__.py

* remove duplicate fixtures

* disable pylint warning

* simplify configuration fixture

* remove empty conftest

* remove crap from local pyprojects
2026-07-17 14:00:20 +03:00

41 lines
1.0 KiB
TypeScript

import react from "@vitejs/plugin-react";
import path from "path";
import { defineConfig, type Plugin } from "vite";
function rename(oldName: string, newName: string): Plugin {
return {
enforce: "post",
generateBundle(_, bundle) {
if (bundle[oldName]) {
bundle[oldName].fileName = newName;
}
},
name: "rename",
};
}
export default defineConfig({
base: "/",
build: {
chunkSizeWarningLimit: 10000,
emptyOutDir: false,
outDir: path.resolve(__dirname, "../ahriman-web/package/share/ahriman/templates"),
rolldownOptions: {
output: {
assetFileNames: "static/[name].[ext]",
chunkFileNames: "static/[name].js",
entryFileNames: "static/[name].js",
},
},
},
plugins: [react(), rename("index.html", "build-status.jinja2")],
resolve: {
tsconfigPaths: true,
},
server: {
proxy: {
"/api": "http://localhost:8080",
},
},
});