Skip to content

Commit

Permalink
Fix issue where path slash is required.
Browse files Browse the repository at this point in the history
  • Loading branch information
GirlBossRush committed Nov 24, 2021
1 parent 479b6a8 commit 43af6fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/vs/code/browser/workbench/workbench-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
<script src="./static/out/vs/loader.js"></script>
<script src="./static/out/vs/webPackagePaths.js"></script>
<script>
const baseUrl = new URL(window.location.href);
baseUrl.search = '';
baseUrl.hash = '';

/**
* Updated to use relative path.
* @author coder
*/
Object.keys(self.webPackagePaths).map(function (key, index) {
self.webPackagePaths[key] = `${baseUrl.href}static/remote/web/node_modules/${key}/${self.webPackagePaths[key]}`;
self.webPackagePaths[key] = new URL(`./static/remote/web/node_modules/${key}/${self.webPackagePaths[key]}`, window.location.href).toString();
});
require.config({
baseUrl: `${baseUrl.href}static/out`,
baseUrl: new URL('./static/out', window.location.href).toString(),
recordStats: true,
trustedTypesPolicy: window.trustedTypes?.createPolicy('amdLoader', {
createScriptURL(value) {
Expand Down
12 changes: 6 additions & 6 deletions src/vs/code/browser/workbench/workbench.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
<script src="./static/out/vs/loader.js"></script>
<script src="./static/out/vs/webPackagePaths.js"></script>
<script>
const baseUrl = new URL(window.location.href);
baseUrl.search = '';
baseUrl.hash = '';

/**
* Updated to use relative path.
* @author coder
*/
Object.keys(self.webPackagePaths).map(function (key, index) {
self.webPackagePaths[key] = `${baseUrl.href}static/node_modules/${key}/${self.webPackagePaths[key]}`;
self.webPackagePaths[key] = new URL(`./static/node_modules/${key}/${self.webPackagePaths[key]}`, window.location.href).toString();
});
require.config({
baseUrl: `${baseUrl.href}static/out`,
baseUrl: new URL('./static/out', window.location.href).toString(),
recordStats: true,
trustedTypesPolicy: window.trustedTypes?.createPolicy('amdLoader', {
createScriptURL(value) {
Expand Down

0 comments on commit 43af6fc

Please sign in to comment.