【问题标题】:how to load workbench ui in vscode extensionhow to load workbench ui in vscode extension
【发布时间】:2022-12-02 13:22:06
【问题描述】:

I\'m developing a vscode extension, and I\'m currently facing a problem, and I\'d like to seek your help.

I want to use the VScode UI in the webview created by the plug-in to ensure the consistency of the user\'s vision. How do I refer to the resource?

I tried the following:

  1. Use appRoot to directly splice vscode-file://vscode-app/, displaying network errors
  2. Use appRoot to refer to \'file://\' and find: Not allowed to load local resource
  3. Use asWebviewUri, display HTTP code 401
const cssfile = vscode.Uri.file(path.join(vscode.env.appRoot,\"out/vs/workbench/workbench.desktop.main.css\"));
const cssurl = this.view.webview.asWebviewUri(cssfile);
console.log(cssurl);

    标签: visual-studio-code


    【解决方案1】:
    猜你喜欢
    • 2022-12-26
    • 2022-12-27
    • 2022-12-02
    • 2022-12-02
    • 2022-12-19
    • 1970-01-01
    • 2022-12-28
    • 2022-12-02
    • 2022-12-26
    相关资源
    最近更新 更多