mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
Move the webviewResourceRoot property to be set on each webview instead of as a global property
For #72155 This allows us to potentially change the resource root per webview
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
const rootUri = vscode.Uri.parse(vscode.env.webviewResourceRoot);
|
||||
|
||||
export function toResoruceUri(uri: vscode.Uri): vscode.Uri {
|
||||
export function toResoruceUri(webviewResourceRoot: string, uri: vscode.Uri): vscode.Uri {
|
||||
const rootUri = vscode.Uri.parse(webviewResourceRoot);
|
||||
return rootUri.with({
|
||||
path: rootUri.path + uri.path,
|
||||
query: uri.query,
|
||||
|
||||
Reference in New Issue
Block a user