mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 00:32:05 +00:00
30 lines
758 B
TypeScript
30 lines
758 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
// /** @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();
|
|
// });
|
|
// }
|
|
// };
|
|
|
|
export default defineConfig({
|
|
plugins: [sveltekit()],
|
|
define: {
|
|
APP_VERSION: JSON.stringify(process.env.npm_package_version)
|
|
},
|
|
build: {
|
|
sourcemap: true
|
|
},
|
|
worker: {
|
|
format: 'es'
|
|
}
|
|
});
|