-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
130 lines (126 loc) · 4.3 KB
/
svelte.config.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/* svelte.config.js */
import adapter from "svelte-adapter-bun";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import path from "path";
const dev = process.env.NODE_ENV === 'development';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter({
dynamic_origin: true,
precompress: false,
runtime: 'bun',
serverBunOptions: {
target: 'bun',
platform: 'bun'
}
}),
files: {
assets: 'static',
},
paths: {
assets: '',
},
alias: {
$lib: path.resolve("./src/lib"),
$utils: path.resolve("./src/utils"),
$models: path.resolve("./src/models"),
$frontendConfig: path.resolve("./src/frontend-config.ts"),
$backendConfig: path.resolve("./src/backend-config.ts"),
"$env/static/private": path.resolve("./src/env/static/private.ts"),
"$env/static/public": path.resolve("./src/env/static/public.ts"),
'$app': path.resolve('./.svelte-kit/runtime/app'),
'$app/environment': path.resolve('./.svelte-kit/runtime/app/environment'),
'$app/navigation': path.resolve('./.svelte-kit/runtime/app/navigation'),
'$app/stores': path.resolve('./.svelte-kit/runtime/app/stores')
},
env: {
dir: process.cwd(),
publicPrefix: "PUBLIC_",
},
csp: {
mode: "auto",
directives: {
'default-src': ["'self'"],
'connect-src': [
"'self'",
"blob:",
"wss://api.openreplay.com",
"wss://openreplay.prd.shared-services.eu.pvh.cloud",
"ws://api.openreplay.com",
"https://api.openreplay.com",
"https://openreplay.prd.shared-services.eu.pvh.cloud",
// OpenReplay minimal required configuration
"https://api.openreplay.com",
"wss://api.openreplay.com",
"ws://api.openreplay.com",
"https://openreplay.prd.shared-services.eu.pvh.cloud",
"wss://openreplay.prd.shared-services.eu.pvh.cloud",
"ws://openreplay.prd.shared-services.eu.pvh.cloud",
// Add these new entries for metadata/logging
"https://*.openreplay.com",
"https://openreplay.prd.shared-services.eu.pvh.cloud/*",
// Other necessary endpoints
"https://capella-document-search.prd.shared-services.eu.pvh.cloud",
"https://login.microsoftonline.com",
"https://*.microsoftonline.com",
"https://graph.microsoft.com",
"https://*.graph.microsoft.com",
"https://api.openai.com",
"https://*.pinecone.io",
"https://*.svc.pinecone.io",
"https://*.shared-services.eu.pvh.cloud",
"https://*.cloudfront.net",
"https://*.aws.cloud.es.io",
"https://*.aws.elastic-cloud.com",
"https://*.cloud.couchbase.com",
"https://*.siobytes.com",
"https://eu-b2b.apm.eu-central-1.aws.cloud.es.io",
// Development endpoints
...(dev ? ["ws://localhost:*", "http://localhost:*"] : [])
],
'media-src': ["'self'", "https://*.cloudfront.net"],
'script-src': [
"'self'",
"'unsafe-eval'",
"https://api.openreplay.com",
"https://openreplay.prd.shared-services.eu.pvh.cloud",
"https://capella-document-search.prd.shared-services.eu.pvh.cloud"
],
'style-src': [
"'self'",
"'unsafe-inline'",
"https://capella-document-search.prd.shared-services.eu.pvh.cloud",
"https://openreplay.prd.shared-services.eu.pvh.cloud"
],
'img-src': [
"'self'",
"data:",
"blob:",
"https://capella-document-search.prd.shared-services.eu.pvh.cloud",
"https://openreplay.prd.shared-services.eu.pvh.cloud"
],
'font-src': [
"'self'",
"data:",
"https://capella-document-search.prd.shared-services.eu.pvh.cloud"
],
'frame-src': [
"'self'",
"https://login.microsoftonline.com",
"https://*.microsoftonline.com"
],
'worker-src': ["'self'", "blob:"],
'child-src': ["'self'", "blob:"]
}
},
csrf: {
checkOrigin: false
}
},
vitePlugin: {
inspector: true
},
};
export default config;