Skip to content

VSCode extension for enabling hot reload when coding webview.

License

Notifications You must be signed in to change notification settings

k-kuroguro/vscode-webview-hotreload

Repository files navigation

vscode-webview-hotreload

VSCode extension for enabling hot reload when coding webview.

demo

How to use

  1. Set environment variable IS_EXTENSION_DEBUGGING as true to extension's launch.json wanted to use hot reload.
      {
         "name": "Run Extension",
         "type": "extensionHost",
         "request": "launch",
         "args": [
            "--extensionDevelopmentPath=${workspacIS_EXTENSION_DEBUGGINGeFolder}"
         ],
         "outFiles": [
            "${workspaceFolder}/dist/**/*.js"
         ],
         "preLaunchTask": "${defaultBuildTask}",
+         "env": {
+            "IS_EXTENSION_DEBUGGING": "true"
+         }
      },
  1. Set folder of webview code as vscode-webview-hotreload.watchFolder. (ex. "vscode-webview-hotreload.watchFolder": "c:\\User\\Desktop\\ExtensionProject")

  2. Start debug session and active webview.

  3. If you changed webview code, webview will reload.

About

VSCode extension for enabling hot reload when coding webview.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published