sticky-notes/vite.config.ts

25 lines
532 B
TypeScript
Raw Normal View History

2023-09-11 05:49:56 +08:00
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [
sveltekit(),
{
name: 'configure-response-headers',
configureServer: (server) => {
server.middlewares.use((_req, res, next) => {
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
next();
});
},
},
],
2023-09-11 06:14:54 +08:00
build: {
target: 'esnext',
},
2023-09-11 05:49:56 +08:00
optimizeDeps: {
exclude: ['sqlocal', 'bytemd'],
},
});