Skip to content

Commit 69a4e57

Browse files
add webview toolkit UI js min to web/scripts for now (#44)
instead of trying to load it from `node_modules`, which is stripped out form this ext. bundle.
1 parent c99633e commit 69a4e57

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

src/views/tableView.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,15 @@ export class TableView {
347347
* @returns Html string for the webview content.
348348
*/
349349
private getWebviewContent(webview: Webview, extensionUri: Uri): string {
350-
// create webview UI toolkitUri
351-
const webviewUiToolkitUri: Uri = fileUtils.getWebviewUri(webview, extensionUri, [
352-
'node_modules',
353-
'@vscode',
354-
'webview-ui-toolkit',
355-
'dist',
356-
'toolkit.js',
357-
]);
350+
// create webview UI toolkit Uri
351+
const webviewUiToolkitUri: Uri =
352+
fileUtils.getWebviewUri(webview, extensionUri, ['web', 'scripts', 'toolkit.min.js']);
358353

359354
// create table view script and styles Uris
360-
const tableViewScriptUri: Uri = fileUtils.getWebviewUri(webview, extensionUri, ['web', 'scripts', 'tableView.js']);
361-
const tableViewStylesUri: Uri = fileUtils.getWebviewUri(webview, extensionUri, ['web', 'styles', 'table-view.css']);
355+
const tableViewScriptUri: Uri =
356+
fileUtils.getWebviewUri(webview, extensionUri, ['web', 'scripts', 'tableView.js']);
357+
const tableViewStylesUri: Uri =
358+
fileUtils.getWebviewUri(webview, extensionUri, ['web', 'styles', 'table-view.css']);
362359

363360
// get CSP (Content-Security-Policy) source link for this webview
364361
const cspSource: string = this.webviewPanel.webview.cspSource;

0 commit comments

Comments
 (0)