mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
better handling of frontend updates, following svelte docs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
import * as child_process from 'node:child_process';
|
||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
@@ -14,7 +15,12 @@ const config = {
|
||||
pages: 'build',
|
||||
assets: 'build',
|
||||
fallback: 'index.html'
|
||||
})
|
||||
}),
|
||||
// poll for new version name every 60 seconds (to trigger reload mechanic in +layout.svelte)
|
||||
version: {
|
||||
name: child_process.execSync('git rev-parse HEAD').toString().trim(),
|
||||
pollInterval: 60000
|
||||
}
|
||||
},
|
||||
vitePlugin: {
|
||||
// inspector: {
|
||||
|
||||
Reference in New Issue
Block a user