Skip to content

Commit

Permalink
VSCode resources should use webiew.asWebviewUri to construct valid UR…
Browse files Browse the repository at this point in the history
…Is for local files
  • Loading branch information
nilshoffmann committed Mar 3, 2023
1 parent 543157c commit 82a67d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vscode-client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,8 @@ export function activate_preview(context: ExtensionContext) {
const on_disk_files: any = {}
const files = ["vis-network.min.js", "vis-network.min.css"]
for (let f of files) {
on_disk_files[f] = Uri.file(
path.join(context.extensionPath, 'include', f))
.with({ scheme: 'vscode-resource' })
on_disk_files[f] = panel.webview.asWebviewUri(Uri.file(
path.join(context.extensionPath, 'include', f)))
}

// And set its HTML content
Expand Down

0 comments on commit 82a67d3

Please sign in to comment.