Skip to content

Building the Extension

From the repo root:

Terminal window
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\build-extension.ps1

This rebuilds the frontend, refreshes extension/media/ with the new bundle, and compiles the extension — the same fix used for blank webview issues. Optional flags: -CleanMedia (default on) wipes extension/media/ before copying; -CleanNodeModules forces a clean node_modules reinstall.

Terminal window
cd extension
npm run compile

compile runs three steps in order: build:webview (builds frontend/ with vite.config_extension.ts and copies the output into extension/media/), prepare:native-scanner, then tsc -p ./tsconfig.json.

Terminal window
cd extension
npm run package

Runs compile then vsce package --no-dependencies, producing a .vsix file in extension/.

Press F5 in VS Code to restart the Extension Development Host with the new bundle, or reinstall the .vsix if you’re testing a packaged build.