mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-03-24 02:13:38 +00:00
refactor: reorder arguments in web ui
This commit is contained in:
@@ -4,34 +4,34 @@ import { defineConfig, type Plugin } from "vite";
|
||||
|
||||
function rename(oldName: string, newName: string): Plugin {
|
||||
return {
|
||||
name: "rename",
|
||||
enforce: "post",
|
||||
generateBundle(_, bundle) {
|
||||
if (bundle[oldName]) {
|
||||
bundle[oldName].fileName = newName;
|
||||
}
|
||||
},
|
||||
name: "rename",
|
||||
};
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), rename("index.html", "build-status.jinja2")],
|
||||
base: "/",
|
||||
resolve: {
|
||||
tsconfigPaths: true,
|
||||
},
|
||||
build: {
|
||||
chunkSizeWarningLimit: 10000,
|
||||
emptyOutDir: false,
|
||||
outDir: path.resolve(__dirname, "../package/share/ahriman/templates"),
|
||||
rollupOptions: {
|
||||
rolldownOptions: {
|
||||
output: {
|
||||
entryFileNames: "static/[name].js",
|
||||
chunkFileNames: "static/[name].js",
|
||||
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",
|
||||
|
||||
Reference in New Issue
Block a user