Home

Awesome

VSCode Webview React

This project was bootstrapped with

The webview API allows extensions to create customizable views within VSCode. Single Page Application frameworks are perfect fit for this use case. However, to make modern JavaScript frameworks/toolchains appeal to VSCode webview API's security best practices requires some knowledge of both the bundling framework you are using and how VSCode secures webview. This project aims to provide an out-of-box starter kit for Create React App and TypeScript in VSCode's webview.

Development

Run following commands in the terminal

yarn install --ignore-engines
yarn run build

And then press F5, in Extension Development Host session, run Start React Webview command from command palette.

Under the hood

Things we did on top of Create React App TypeScript template

Limitations

Right now you can only run production bits (yarn run build) in the webview, how to make dev bits work (webpack dev server) is still unknown yet. Suggestions and PRs welcome !