open-webui/vite.config.ts

33 lines
646 B
TypeScript
Raw Normal View History

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