Skip to content

Commit

Permalink
fixup! refactor: use esbuild-plugins-node-modules-polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Mar 13, 2024
1 parent ec4dec7 commit fc5895a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/wrangler/src/deployment-bundle/bundle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fs from "node:fs";
import { builtinModules } from "node:module";
import * as path from "node:path";
import * as esbuild from "esbuild";
import { nodeModulesPolyfillPlugin } from "esbuild-plugins-node-modules-polyfill";
Expand Down Expand Up @@ -344,6 +345,11 @@ export async function bundleWorker(
? [
nodeModulesPolyfillPlugin({
globals: { process: true, Buffer: true },
modules: Object.fromEntries(
builtinModules.map((a) =>
a === "net" ? [a, "empty"] : [a, true]
)
),
}),
]
: []),
Expand Down

0 comments on commit fc5895a

Please sign in to comment.