forked from dirkwhoffmann/vAmigaNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
35 lines (29 loc) · 827 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
//import basicSsl from '@vitejs/plugin-basic-ssl'
import fs from 'fs';
const config: UserConfig = {
plugins: [
{
name: 'configure-response-headers',
configureServer: server => {
server.middlewares.use((_req, res, next) => {
//these two headers are added by the serviceWorker.js so we do not need them to add here
//res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
//res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
next();
});
}
},
/*basicSsl(),*/sveltekit()],
server: {
https: {
key: fs.readFileSync('localhost-key.pem'),
cert: fs.readFileSync('localhost.pem'),
},
},
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
};
export default config;