-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
37 lines (34 loc) · 796 Bytes
/
vite.config.ts
File metadata and controls
37 lines (34 loc) · 796 Bytes
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
36
37
import { defineConfig } from 'vite';
import { fileURLToPath, URL } from 'node:url';
import { resolve } from 'node:path';
import dts from 'unplugin-dts/vite';
export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
sourcemap: true,
lib: {
entry: resolve(__dirname, 'src/main.ts'),
name: 'SharedMemoryObjects',
fileName: 'shared-memory-objects'
}
},
plugins: [dts({ tsconfigPath: './tsconfig.app.json' })],
server: {
port: 8080,
host: '127.0.0.1',
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
}
},
preview: {
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
}
}
});