open-webui/vite.config.ts

33 lines
646 B
TypeScript
Raw Permalink Normal View History

2023-10-08 22:38:42 +00:00
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
2025-02-08 10:34:30 +00:00
import { viteStaticCopy } from 'vite-plugin-static-copy';
2023-10-08 22:38:42 +00:00
export default defineConfig({
2025-02-08 10:34:30 +00:00
plugins: [
sveltekit(),
viteStaticCopy({
targets: [
{
src: 'node_modules/onnxruntime-web/dist/*.jsep.*',
dest: 'wasm'
}
]
})
],
2024-02-22 01:10:27 +00:00
define: {
2024-05-22 19:22:38 +00:00
APP_VERSION: JSON.stringify(process.env.npm_package_version),
2024-05-26 07:49:30 +00:00
APP_BUILD_HASH: JSON.stringify(process.env.APP_BUILD_HASH || 'dev-build')
},
build: {
2025-06-08 21:36:32 +00:00
sourcemap: true
},
worker: {
format: 'es'
2025-06-13 10:42:09 +00:00
},
esbuild: {
2025-06-27 12:42:10 +00:00
pure: process.env.ENV === 'dev' ? [] : ['console.log', 'console.debug']
2025-06-13 11:54:15 +00:00
}
2023-10-08 22:38:42 +00:00
});