-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathifc-cli.config.js
More file actions
79 lines (75 loc) · 2.53 KB
/
ifc-cli.config.js
File metadata and controls
79 lines (75 loc) · 2.53 KB
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
module.exports = function (frameRouter, workerPool) {
let hostname = window.location.hostname;
let hostRootUrl =
window.location.origin + window.location.pathname + window.location.search;
workerPool.workerConfig = {
clients: {
app1Worker: {
script: "clients/dist/client-worker.js", // The worker script
// Optional app data to allow the worker to generate URLs for an associated app
// via client APIs like `urlFromClientPath`
app: {
url: `/clients/client-app-1/#/`,
assignedRoute: "/app1",
},
},
app2Worker: {
script: "clients/dist/client-worker.js",
app: {
url: `/clients/client-app-2/#/`,
assignedRoute: "/app2",
},
},
},
envData: {
locale: "en-US",
hostRootUrl: hostRootUrl,
// Optional custom data
custom: {},
},
};
frameRouter.clientConfig = {
clients: {
application1: {
url: `/clients/client-app-1/#/`,
assignedRoute: "/app1",
},
application2: {
// We are removing the built-in proxy route example for now, as there are conflicts with vite and
// we will be adding improvements to the proxy behavior in the near future
url: `/clients/client-app-2/#/`,
assignedRoute: "/app2",
allow: "camera self;", // optional
sandbox: "allow-presentation allow-modals", // optional
defaultTitle: "iframe Application 2 Example", // optional, but needed for accessibility
},
application3: {
// We are removing the built-in proxy route example for now, as there are conflicts with vite and
// we will be adding improvements to the proxy behavior in the near future
url: `/clients/client-app-2/#/`,
assignedRoute: "/app2/test",
allow: "camera self;", // optional
sandbox: "allow-presentation allow-modals", // optional
defaultTitle: "iframe Application 2 Example", // optional, but needed for accessibility
},
},
envData: {
locale: "en-US",
hostRootUrl: hostRootUrl,
registeredKeys: [
{ key: "a", ctrlKey: true },
{ key: "b", altKey: true },
{ key: "a", ctrlKey: true, shiftKey: true },
],
custom: getCustomClientData(),
},
};
return {
// These are the topics that the host app should display payloads for when
// the client publishes on them.
publishTopics: ["publish.topic"],
};
};
function getCustomClientData() {
return { test: "This is only a test" };
}