22 lines
498 B
TypeScript
22 lines
498 B
TypeScript
|
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();
|
||
|
});
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
optimizeDeps: {
|
||
|
exclude: ['sqlocal', 'bytemd'],
|
||
|
},
|
||
|
});
|