This commit is contained in:
Andrew 2024-10-25 19:58:35 -07:00
parent 38662d2824
commit f56772a07a
4 changed files with 6 additions and 8 deletions

View file

@ -11,7 +11,7 @@
"Other"
],
"activationEvents": [],
"main": "./out/extension.js",
"main": "./out/extension/extension.js",
"contributes": {
"configuration": {
"title": "Void",

View file

@ -11,13 +11,13 @@ function generateNonce() {
// call this when you have access to the webview to set its html
export const updateWebviewHTML = (webview: vscode.Webview, extensionUri: vscode.Uri, { jsLocation, cssLocation }: { jsLocation: string, cssLocation: string }) => {
export const updateWebviewHTML = (webview: vscode.Webview, extensionUri: vscode.Uri, { jsOutLocation, cssOutLocation }: { jsOutLocation: string, cssOutLocation: string }) => {
// 'dist/sidebar/index.js'
// 'dist/sidebar/styles.css'
const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, jsLocation));
const stylesUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, cssLocation));
const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, jsOutLocation));
const stylesUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, cssOutLocation));
const rootUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri));
const nonce = generateNonce();

View file

@ -10,12 +10,10 @@ export class CtrlKWebviewProvider {
constructor(context: vscode.ExtensionContext) {
this._extensionUri = context.extensionUri
}
// called by us
updateWebviewHTML(webview: vscode.Webview) {
_updateWebviewHTML(webview, this._extensionUri, { jsLocation: 'dist/webviews/ctrlk/index.js', cssLocation: 'dist/webviews/styles.css' })
_updateWebviewHTML(webview, this._extensionUri, { jsOutLocation: 'dist/webviews/ctrlk/index.js', cssOutLocation: 'dist/webviews/styles.css' })
}
}

View file

@ -23,7 +23,7 @@ export class SidebarWebviewProvider implements vscode.WebviewViewProvider {
// called by us
updateWebviewHTML(webview: vscode.Webview) {
_updateWebviewHTML(webview, this._extensionUri, { jsLocation: 'dist/webviews/sidebar/index.js', cssLocation: 'dist/webviews/styles.css' })
_updateWebviewHTML(webview, this._extensionUri, { jsOutLocation: 'dist/webviews/sidebar/index.js', cssOutLocation: 'dist/webviews/styles.css' })
}
// called internally by vscode