Skip to content

Commit

Permalink
import -> require
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Oct 3, 2024
1 parent 853e030 commit 72f2f99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cloudflare-workers-bindings-extension",
"displayName": "cloudflare-workers-bindings-extension",
"version": "0.0.1",
"version": "0.0.3",
"description": "Manage your Cloudflare Worker's bindings",
"categories": [
"Other"
Expand Down
4 changes: 2 additions & 2 deletions packages/cloudflare-workers-bindings-extension/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function getSdk(workspaceRoot: string): Promise<Cloudflare> {
)
);

const { getSdk } = await import(wrangler);
const { getSdk } = require(wrangler);

return getSdk();
}
Expand All @@ -29,7 +29,7 @@ export async function parseTOML(workspaceRoot: string, file: string) {
)
);

const { parseTOML } = await import(wrangler);
const { parseTOML } = require(wrangler);

return parseTOML(await readFile(file, "utf8"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class DepNodeProvider implements vscode.TreeDataProvider<Binding> {
)
);

const { unstable_getMiniflareWorkerOptions } = await import(wrangler);
const { unstable_getMiniflareWorkerOptions } = require(wrangler);

console.log(path.join(this.workspaceRoot!, "wrangler.toml"));
// TODO: multiroot workspaces
Expand Down

0 comments on commit 72f2f99

Please sign in to comment.