Skip to content

vscode扩展放进去后webview不能正常显示 #3214

Description

@tanjiancheng

描述你的问题(Describe the bug)
我自己修改编写的vscode插件放进去extensions后,图标和相关的webview都没有显示

image
image

打开控制台显示
image

对比同样的插件,我使用theia是正常的
image
image

所以这块是有什么兼容性问题吗?

预期表现(Expected behavior)
能正常显示图标和相关的view内容

环境信息(Environment)

  • OS: Windows10
  • Browser: chrome
  • OpenSumi Version: 2.26.8

Activity

  1. bytemain commented on Jan 29, 2024

    @bytemain
    Member

    我们的 webview 是基于 iframe 做的,因为 iframe 的一些通信的限制,我们需要通过加载 /webview/index.html 来包裹一层 webview,你这里的报错看起来是加载不到这个地址。

    可以参考下这个 webpack 脚本,构建一下 webview 到某个目录,然后让 server 能通过某个路径能访问到这个 webview 的地址:

    webview 的地址可以通过前端 ClientApp 的 webviewEndpoint 属性配置,参考:

  2. locked and limited conversation to collaborators on Jan 29, 2024
  3. converted this issue into a discussion #3315 on Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions