@@ -74,22 +74,33 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
74
74
Replacement : fmt .Sprintf ("ide.%s/code/marketplace.json" , ctx .Config .Domain ),
75
75
Path : "/ide/out/vs/workbench/workbench.web.main.js" ,
76
76
}},
77
- InlineStatic : []blobserve.InlineReplacement {{
78
- Search : "${window.location.origin}" ,
79
- Replacement : "." ,
80
- }, {
81
- Search : "value.startsWith(window.location.origin)" ,
82
- Replacement : "value.startsWith(window.location.origin) || value.startsWith('${ide}')" ,
83
- }, {
84
- Search : "./out" ,
85
- Replacement : "${ide}/out" ,
86
- }, {
87
- Search : "./node_modules" ,
88
- Replacement : "${ide}/node_modules" ,
89
- }, {
90
- Search : "/_supervisor/frontend" ,
91
- Replacement : "${supervisor}" ,
92
- }},
77
+ InlineStatic : []blobserve.InlineReplacement {
78
+ {
79
+ Search : "const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();" ,
80
+ Replacement : "const baseUrl = '${ide}';" ,
81
+ },
82
+ {
83
+ Search : "{{WORKBENCH_WEB_BASE_URL}}" ,
84
+ Replacement : "${ide}" ,
85
+ }, {
86
+ Search : "value.startsWith(window.location.origin)" ,
87
+ Replacement : "value.startsWith(window.location.origin) || value.startsWith('${ide}')" ,
88
+ }, {
89
+ Search : "/_supervisor/frontend" ,
90
+ Replacement : "${supervisor}" ,
91
+ },
92
+ // deprecated
93
+ {
94
+ Search : "${window.location.origin}" ,
95
+ Replacement : "." ,
96
+ }, {
97
+ Search : "./out" ,
98
+ Replacement : "${ide}/out" ,
99
+ }, {
100
+ Search : "./node_modules" ,
101
+ Replacement : "${ide}/node_modules" ,
102
+ },
103
+ },
93
104
},
94
105
ctx .RepoName (ctx .Config .Repository , workspace .SupervisorImage ): {
95
106
PrePull : []string {},
0 commit comments