open-webui/vite.config.ts

31 lines
835 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';
2024-05-17 06:25:55 +00:00
// /** @type {import('vite').Plugin} */
// const viteServerConfig = {
// name: 'log-request-middleware',
// configureServer(server) {
// server.middlewares.use((req, res, next) => {
// res.setHeader('Access-Control-Allow-Origin', '*');
// res.setHeader('Access-Control-Allow-Methods', 'GET');
// res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
// res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
// next();
// });
// }
// };
2024-05-17 03:49:28 +00:00
2023-10-08 22:38:42 +00:00
export default defineConfig({
2024-05-17 06:25:55 +00:00
plugins: [sveltekit()],
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: {
sourcemap: true
},
worker: {
format: 'es'
2024-02-22 01:10:27 +00:00
}
2023-10-08 22:38:42 +00:00
});