Desktop: Fix error in plugin content scripts generated with Webpack (#10680)

This commit is contained in:
Henry Heino
2024-07-04 14:58:26 +02:00
committed by GitHub
parent 7e4533d811
commit c197a83de8
2 changed files with 6 additions and 0 deletions
@@ -45,6 +45,9 @@
<script src="./scrollmap.js"></script>
<script>
// Fixes a warning when loading some TypeScript plugins generated with webpack.
window.exports = {};
// This is function used internally to send message from the webview to
// the host.
const ipcProxySendToHost = (methodName, arg) => {
@@ -2,6 +2,9 @@
const webviewApiPromises_ = {};
let viewMessageHandler_ = () => {};
// This silences a warning when running plugins generated with Webpack.
window.exports ??= {};
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
const webviewApi = {
postMessage: function(message) {