mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 10:23:32 +00:00
vscode: Use ESM modules
A vscode extension must use CJS, but that code may use ESM modules in turn. So update to ESM, fixing a warning when importing our WASM code.
This commit is contained in:
parent
d9672c5a21
commit
cb66bc1650
3 changed files with 4 additions and 4 deletions
|
@ -50,7 +50,7 @@ esbuild
|
|||
entryPoints: ["src/browser-lsp-worker.ts"],
|
||||
bundle: true,
|
||||
outfile: "out/browserServerMain.js",
|
||||
format: "iife",
|
||||
format: "esm",
|
||||
platform: "browser",
|
||||
plugins: [wasmPlugin],
|
||||
})
|
||||
|
@ -79,6 +79,6 @@ esbuild
|
|||
bundle: true,
|
||||
outfile: "out/propertiesView.js",
|
||||
platform: "browser",
|
||||
format: "iife",
|
||||
format: "esm",
|
||||
})
|
||||
.catch(() => process.exit(1));
|
||||
|
|
|
@ -47,7 +47,7 @@ function startClient(
|
|||
"out/browserServerMain.js",
|
||||
);
|
||||
|
||||
const worker = new Worker(serverMain.toString(true));
|
||||
const worker = new Worker(serverMain.toString(true), { type: "module" });
|
||||
worker.onmessage = (m) => {
|
||||
// We cannot start sending messages to the client before we start listening which
|
||||
// the server only does in a future after the wasm is loaded.
|
||||
|
|
|
@ -293,7 +293,7 @@ export class PropertiesViewProvider implements vscode.WebviewViewProvider {
|
|||
<link href="${codiconsUri}" rel="stylesheet" />
|
||||
</head>
|
||||
<body class="properties-editor">
|
||||
<script src="${scriptUri}"></script>
|
||||
<script src="${scriptUri}" type="module"></script>
|
||||
</body>
|
||||
</html>`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue