Archived
1
0

Feature/relative url (#307)

* resrouce relative url

* add url pathname for require.toUrl (fix webview url)

* rest resrouce relative url

* fix resource url

* ignore .vscode
This commit is contained in:
majik
2019-04-11 09:07:53 +08:00
committed by Asher
parent 3fae68bbab
commit 4b217fba00
4 changed files with 14 additions and 8 deletions

View File

@ -28,7 +28,8 @@ class StorageDatabase implements workspaceStorage.IStorageDatabase {
}
this.triggerFlush(WillSaveStateReason.SHUTDOWN);
navigator.sendBeacon(`/resource${this.path}`, this.content);
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";
navigator.sendBeacon(`${resourceBaseUrl}/${this.path}`, this.content);
});
}