ptato
How to polyfill node imports when bundling with the deno version of esbuild?
Hello,
I am trying to run esbuild using https://deno.land/x/esbuild to bundle a Deno project into a single file. I am using the
denoPlugins
from https://deno.land/x/esbuild_deno_loader to resolve npm imports, but I need all node std lib imports to be polyfilled as well (which the plugin doesn't do because it assumes youre running the bundle using Deno). My intended compile target is cloudflare workers so i need the node imports to be polyfilled.
I tried using https://www.npmjs.com/package/esbuild-plugin-polyfill-node alongside the denoPlugins
but I get the error Cannot find package '@jspm/core'
.
this is my general setup:
4 replies