Get URI of external CSS & JS files for VSCode Webview

PHOTO EMBED

Sat Feb 06 2021 13:14:41 GMT+0000 (Coordinated Universal Time)

Saved by @mishka #typescript

// Get path to resource on disk
 const onDiskPath = vscode.Uri.file( 
   path.join(context.extensionPath, 'css', 'style.css')
);
// And get the special URI to use with the webview
const cssURI = panel.webview.asWebviewUri(onDiskPath);
content_copyCOPY

https://mishka.codes/webviews-in-vscode