Some checks failed
Create and publish Docker images with specific build args / build-main-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-main-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda126-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda126-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Create and publish Docker images with specific build args / build-slim-image (linux/amd64, ubuntu-latest) (push) Has been cancelled
Create and publish Docker images with specific build args / build-slim-image (linux/arm64, ubuntu-24.04-arm) (push) Has been cancelled
Python CI / Format Backend (3.11.x) (push) Has been cancelled
Python CI / Format Backend (3.12.x) (push) Has been cancelled
Frontend Build / Format & Build Frontend (push) Has been cancelled
Frontend Build / Frontend Unit Tests (push) Has been cancelled
Create and publish Docker images with specific build args / merge-main-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-cuda-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-cuda126-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-ollama-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-slim-images (push) Has been cancelled
Close inactive issues / close-issues (push) Has been cancelled
65 lines
1.3 KiB
TypeScript
65 lines
1.3 KiB
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
sveltekit(),
|
|
viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: 'node_modules/onnxruntime-web/dist/*.jsep.*',
|
|
|
|
dest: 'wasm'
|
|
}
|
|
]
|
|
})
|
|
],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true
|
|
},
|
|
'/oauth': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true
|
|
},
|
|
'/static': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true
|
|
}
|
|
},
|
|
watch: {
|
|
// watch static folder for changes
|
|
ignored: ['!**/static/**']
|
|
}
|
|
},
|
|
define: {
|
|
APP_VERSION: JSON.stringify(process.env.npm_package_version),
|
|
APP_BUILD_HASH: JSON.stringify(process.env.APP_BUILD_HASH || 'dev-build')
|
|
},
|
|
build: {
|
|
sourcemap: false,
|
|
chunkSizeWarningLimit: 20000,
|
|
cssCodeSplit: false,
|
|
rollupOptions: {
|
|
output: {
|
|
compact: true,
|
|
entryFileNames: 'assets/[name]-[hash].js',
|
|
chunkFileNames: 'assets/[name]-[hash].js',
|
|
assetFileNames: 'assets/[name]-[hash].[ext]'
|
|
},
|
|
external: []
|
|
}
|
|
},
|
|
worker: {
|
|
format: 'es'
|
|
},
|
|
esbuild: {
|
|
pure: process.env.ENV === 'dev' ? [] : ['console.log', 'console.debug', 'console.error'],
|
|
treeShaking: true
|
|
}
|
|
});
|