使用Vite在VSCode扩展中创建Web视图。

huangapple go评论66阅读模式
英文:

Use Vite to create webview in VSCode Extension

问题

这是可能的吗?如何配置?谢谢!

英文:

I'm trying to use Vite (react-ts) to generate script used in webview on VSCode Extension. (Extension is also written in Typescript.)

Is this possible? And how can I configure?

Thanks!

答案1

得分: 3

我也在寻找一个与 react+vite+webview 结合的扩展示例。结果发现 Microsoft 的 GitHub 上有一个相同的示例。

你可以在这里找到它:https://github.com/microsoft/vscode-webview-ui-toolkit-samples/tree/main/frameworks/hello-world-react-vite

这个结构与其他扩展有些不同,但它有它自己的优势。

希望对你有所帮助。

英文:

I was also looking for a extension sample with react+vite+webview. Turns out that Microsoft's github had an example for the same.

You can find it here:https://github.com/microsoft/vscode-webview-ui-toolkit-samples/tree/main/frameworks/hello-world-react-vite

The structure is a bit different than other extensions but it got's its own advantages.

Hope this helps.

huangapple
  • 本文由 发表于 2023年3月7日 09:30:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75657294.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定