mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac: vite config
This commit is contained in:
parent
3ff864eb63
commit
c91b0cd8c4
1 changed files with 1 additions and 15 deletions
|
|
@ -3,20 +3,6 @@ import { defineConfig } from 'vite';
|
||||||
|
|
||||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||||
|
|
||||||
// /** @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({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
sveltekit(),
|
sveltekit(),
|
||||||
|
|
@ -41,6 +27,6 @@ export default defineConfig({
|
||||||
format: 'es'
|
format: 'es'
|
||||||
},
|
},
|
||||||
esbuild: {
|
esbuild: {
|
||||||
pure: ['console.log', 'console.debug']
|
pure: process.env.ENV === 'dev' ? [] : ['console.log', 'console.debug']
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue